1ATOMIC_ADD_UNLESS(9) Driver Basics ATOMIC_ADD_UNLESS(9)
23
4
NAME
6atomic_add_unless - add unless the number is already a given value
7
SYNOPSIS
9int atomic_add_unless(atomic_t * v, int a, int u);
10
ARGUMENTS
12v
13pointer of type atomic_t
1415
a
16the amount to add to v...
1718
u
19...unless v is equal to u.
20
DESCRIPTION
22Atomically adds a to v, so long as v was not already u. Returns
23non-zero if v was not u, and zero otherwise.
24
COPYRIGHT
26Kernel Hackers Manual 2.6. June 2019 ATOMIC_ADD_UNLESS(9)