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

NAME

6       wait_on_bit_lock - wait for a bit to be cleared, when wanting to set it
7

SYNOPSIS

9       int wait_on_bit_lock(void * word, int bit, unsigned mode);
10

ARGUMENTS

12       word
13           the word being waited on, a kernel virtual address
14
15       bit
16           the bit of the word being waited on
17
18       mode
19           the task state to sleep in
20

DESCRIPTION

22       There is a standard hashed waitqueue table for generic use. This is the
23       part of the hashtable's accessor API that waits on a bit when one
24       intends to set it, for instance, trying to lock bitflags. For instance,
25       if one were to have waiters trying to set bitflag and waiting for it to
26       clear before setting it, one would call wait_on_bit in threads waiting
27       to be able to set the bit. One uses wait_on_bit_lock where one is
28       waiting for the bit to clear with the intention of setting it, and when
29       done, clearing it.
30
31       Returns zero if the bit was (eventually) found to be clear and was set.
32       Returns non-zero if a signal was delivered to the process and the mode
33       allows that signal to wake the process.
34
36Kernel Hackers Manual 3.10         June 2019               WAIT_ON_BIT_LOCK(9)
Impressum