1WAIT_EVENT_INTERRUPT(9) Driver Basics WAIT_EVENT_INTERRUPT(9)
2
3
4
6 wait_event_interruptible_timeout - sleep until a condition gets true or
7 a timeout elapses
8
10 wait_event_interruptible_timeout(wq, condition, timeout);
11
13 wq
14 the waitqueue to wait on
15
16 condition
17 a C expression for the event to wait for
18
19 timeout
20 timeout, in jiffies
21
23 The process is put to sleep (TASK_INTERRUPTIBLE) until the condition
24 evaluates to true or a signal is received. The condition is checked
25 each time the waitqueue wq is woken up.
26
27 wake_up has to be called after changing any variable that could change
28 the result of the wait condition.
29
31 0 if the timeout elapsed, -ERESTARTSYS if it was interrupted by a
32 signal, or the remaining jiffies (at least 1) if the condition
33 evaluated to true before the timeout elapsed.
34
36Kernel Hackers Manual 3.10 June 2019 WAIT_EVENT_INTERRUPT(9)