'\" t .\" Title: atomic_dec_and_mutex_lock .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Mutex API reference .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "ATOMIC_DEC_AND_MUTEX" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Mutex API reference" .\" ----------------------------------------------------------------- .\" * 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" atomic_dec_and_mutex_lock \- return holding mutex if we dec to 0 .SH "SYNOPSIS" .HP \w'int\ atomic_dec_and_mutex_lock('u .BI "int atomic_dec_and_mutex_lock(atomic_t\ *\ " "cnt" ", struct\ mutex\ *\ " "lock" ");" .SH "ARGUMENTS" .PP \fIcnt\fR .RS 4 the atomic which we are to dec .RE .PP \fIlock\fR .RS 4 the mutex to return holding if we dec to 0 .RE .SH "DESCRIPTION" .PP return true and hold lock if we dec to 0, return false otherwise .SH "AUTHOR" .PP \fBRusty Russell\fR <\&rusty@rustcorp.com.au\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br