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

NAME

6       wake_up_bit - wake up a waiter on a bit
7

SYNOPSIS

9       void wake_up_bit(void * word, int bit);
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

DESCRIPTION

19       There is a standard hashed waitqueue table for generic use. This is the
20       part of the hashtable's accessor API that wakes up waiters on a bit.
21       For instance, if one were to have waiters on a bitflag, one would call
22       wake_up_bit after clearing the bit.
23
24       In order for this to function properly, as it uses waitqueue_active
25       internally, some kind of memory barrier must be done prior to calling
26       this. Typically, this will be smp_mb__after_clear_bit, but in some
27       cases where bitflags are manipulated non-atomically under a lock, one
28       may need to use a less regular barrier, such fs/inode.c's smp_mb,
29       because spin_unlock does not guarantee a memory barrier.
30
32Kernel Hackers Manual 3.10         June 2019                    WAKE_UP_BIT(9)
Impressum