Lines Matching refs:timeout
57 static long __wait_for_common(struct completion *x, long (*action)(long), long timeout, int state) in __wait_for_common() argument
63 while (!x->done && timeout > 0) in __wait_for_common()
72 timeout = action(timeout); in __wait_for_common()
76 return timeout; // 仍然没有complete, 但是被其他进程唤醒 in __wait_for_common()
84 return timeout ? timeout : 1; // 这里linux返回1,不知道为啥 in __wait_for_common()
106 long wait_for_completion_timeout(struct completion *x, long timeout) in wait_for_completion_timeout() argument
108 BUG_ON(timeout < 0); in wait_for_completion_timeout()
110 timeout = __wait_for_common(x, &rs_schedule_timeout, timeout, PROC_UNINTERRUPTIBLE); in wait_for_completion_timeout()
112 return timeout; in wait_for_completion_timeout()
134 long wait_for_completion_interruptible_timeout(struct completion *x, long timeout) in wait_for_completion_interruptible_timeout() argument
136 BUG_ON(timeout < 0); in wait_for_completion_interruptible_timeout()
139 timeout = __wait_for_common(x, &rs_schedule_timeout, timeout, PROC_INTERRUPTIBLE); in wait_for_completion_interruptible_timeout()
141 return timeout; in wait_for_completion_interruptible_timeout()