'\" t .\" Title: wait_on_bit .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "WAIT_ON_BIT" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" wait_on_bit \- wait for a bit to be cleared .SH "SYNOPSIS" .HP \w'int\ wait_on_bit('u .BI "int wait_on_bit(void\ *\ " "word" ", int\ " "bit" ", int\ (*" "action" ")\ (void\ *), unsigned\ " "mode" ");" .SH "ARGUMENTS" .PP \fIword\fR .RS 4 the word being waited on, a kernel virtual address .RE .PP \fIbit\fR .RS 4 the bit of the word being waited on .RE .PP \fIaction\fR .RS 4 the function used to sleep, which may take special actions .RE .PP \fImode\fR .RS 4 the task state to sleep in .RE .SH "DESCRIPTION" .PP There is a standard hashed waitqueue table for generic use\&. This is the part of the hashtable\*(Aqs accessor API that waits on a bit\&. For instance, if one were to have waiters on a bitflag, one would call \fBwait_on_bit\fR in threads waiting for the bit to clear\&. One uses \fBwait_on_bit\fR where one is waiting for the bit to clear, but has no intention of setting it\&. .SH "COPYRIGHT" .br