'\" t .\" Title: wait_on_atomic_t .\" 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_ATOMIC_T" "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_atomic_t \- Wait for an atomic_t to become 0 .SH "SYNOPSIS" .HP \w'int\ wait_on_atomic_t('u .BI "int wait_on_atomic_t(atomic_t\ *\ " "val" ", int\ (*" "action" ")\ (atomic_t\ *), unsigned\ " "mode" ");" .SH "ARGUMENTS" .PP \fIval\fR .RS 4 The atomic value being waited on, a kernel virtual address .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 Wait for an atomic_t to become 0\&. We abuse the bit\-wait waitqueue table for the purpose of getting a waitqueue, but we set the key to a bit number outside of the target \*(Aqword\*(Aq\&. .SH "COPYRIGHT" .br