'\" t .\" Title: atomic_dec_and_mutex_lock .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: September 2017 .\" Manual: Mutex API reference .\" Source: Kernel Hackers Manual 4.12.13 .\" Language: English .\" .TH "ATOMIC_DEC_AND_MUTEX" "9" "September 2017" "Kernel Hackers Manual 4\&.12\&" "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 \fIatomic_t * cnt\fR .RS 4 the atomic which we are to dec .RE .PP \fIstruct mutex * lock\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