1WAIT_EVENT_INTERRUPT(9) Driver Basics WAIT_EVENT_INTERRUPT(9)
2
3
4
6 wait_event_interruptible_lock_irq_cmd - sleep until a condition gets
7 true. The condition is checked under the lock. This is expected to be
8 called with the lock taken.
9
11 wait_event_interruptible_lock_irq_cmd(wq, condition, lock, cmd);
12
14 wq
15 the waitqueue to wait on
16
17 condition
18 a C expression for the event to wait for
19
20 lock
21 a locked spinlock_t, which will be released before cmd and schedule
22 and reacquired afterwards.
23
24 cmd
25 a command which is invoked outside the critical section before
26 sleep
27
29 The process is put to sleep (TASK_INTERRUPTIBLE) until the condition
30 evaluates to true or a signal is received. The condition is checked
31 each time the waitqueue wq is woken up.
32
33 wake_up has to be called after changing any variable that could change
34 the result of the wait condition.
35
36 This is supposed to be called while holding the lock. The lock is
37 dropped before invoking the cmd and going to sleep and is reacquired
38 afterwards.
39
40 The macro will return -ERESTARTSYS if it was interrupted by a signal
41 and 0 if condition evaluated to true.
42
44Kernel Hackers Manual 3.10 June 2019 WAIT_EVENT_INTERRUPT(9)