1WAIT_EVENT_INTERRUPT(9) Driver Basics WAIT_EVENT_INTERRUPT(9)
2
3
4
6 wait_event_interruptible_exclusive_locked_irq - sleep until a condition
7 gets true
8
10 wait_event_interruptible_exclusive_locked_irq(wq, condition);
11
13 wq
14 the waitqueue to wait on
15
16 condition
17 a C expression for the event to wait for
18
20 The process is put to sleep (TASK_INTERRUPTIBLE) until the condition
21 evaluates to true or a signal is received. The condition is checked
22 each time the waitqueue wq is woken up.
23
24 It must be called with wq.lock being held. This spinlock is unlocked
25 while sleeping but condition testing is done while lock is held and
26 when this macro exits the lock is held.
27
28 The lock is locked/unlocked using spin_lock_irq/spin_unlock_irq
29 functions which must match the way they are locked/unlocked outside of
30 this macro.
31
32 The process is put on the wait queue with an WQ_FLAG_EXCLUSIVE flag set
33 thus when other process waits process on the list if this process is
34 awaken further processes are not considered.
35
36 wake_up_locked has to be called after changing any variable that could
37 change the result of the wait condition.
38
39 The function will return -ERESTARTSYS if it was interrupted by a signal
40 and 0 if condition evaluated to true.
41
43Kernel Hackers Manual 3.10 June 2019 WAIT_EVENT_INTERRUPT(9)