'\" t .\" Title: __atomic_add_unless .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "__ATOMIC_ADD_UNLESS" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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" __atomic_add_unless \- add unless the number is already a given value .SH "SYNOPSIS" .HP \w'int\ __atomic_add_unless('u .BI "int __atomic_add_unless(atomic_t\ *\ " "v" ", int\ " "a" ", int\ " "u" ");" .SH "ARGUMENTS" .PP \fIv\fR .RS 4 pointer of type atomic_t .RE .PP \fIa\fR .RS 4 the amount to add to v\&.\&.\&. .RE .PP \fIu\fR .RS 4 \&.\&.\&.unless v is equal to u\&. .RE .SH "DESCRIPTION" .PP Atomically adds \fIa\fR to \fIv\fR, so long as \fIv\fR was not already \fIu\fR\&. Returns the old value of \fIv\fR\&. .SH "COPYRIGHT" .br