Scroll to navigation

WAIT_ON_BIT_TIMEOUT(9) Driver Basics WAIT_ON_BIT_TIMEOUT(9)

NAME

wait_on_bit_timeout - wait for a bit to be cleared or a timeout elapses

SYNOPSIS

int wait_on_bit_timeout(unsigned long * word, int bit, unsigned mode, unsigned long timeout);

ARGUMENTS

word
the word being waited on, a kernel virtual address
bit
the bit of the word being waited on
mode
the task state to sleep in
timeout
timeout, in jiffies

DESCRIPTION

Use the standard hashed waitqueue table to wait for a bit to be cleared. This is similar to wait_on_bit, except also takes a timeout parameter.
Returned value will be zero if the bit was cleared before the timeout elapsed, or non-zero if the timeout elapsed or process received a signal and the mode permitted wakeup on that signal.

COPYRIGHT

January 2017 Kernel Hackers Manual 4.8.