1WAIT_EVENT_INTERRUPT(9)          Driver Basics         WAIT_EVENT_INTERRUPT(9)
2
3
4

NAME

6       wait_event_interruptible_locked - sleep until a condition gets true
7

SYNOPSIS

9       wait_event_interruptible_locked(wq, condition);
10

ARGUMENTS

12       wq
13           the waitqueue to wait on
14
15       condition
16           a C expression for the event to wait for
17

DESCRIPTION

19       The process is put to sleep (TASK_INTERRUPTIBLE) until the condition
20       evaluates to true or a signal is received. The condition is checked
21       each time the waitqueue wq is woken up.
22
23       It must be called with wq.lock being held. This spinlock is unlocked
24       while sleeping but condition testing is done while lock is held and
25       when this macro exits the lock is held.
26
27       The lock is locked/unlocked using spin_lock/spin_unlock functions which
28       must match the way they are locked/unlocked outside of this macro.
29
30       wake_up_locked has to be called after changing any variable that could
31       change the result of the wait condition.
32
33       The function will return -ERESTARTSYS if it was interrupted by a signal
34       and 0 if condition evaluated to true.
35
37Kernel Hackers Manual 3.10         June 2019           WAIT_EVENT_INTERRUPT(9)
Impressum