atomic_add_unless(9)

atomic_add_unless9

Add unless the number is already a given value

Usage

int atomic_add_unless(atomic_t * v, int a, int u);

Arguments

v

pointer of type atomic_t

a

the amount to add to v...

u

...unless v is equal to u.

Overview

Atomically adds a to v, so long as v was not already u. Returns non-zero if v was not u, and zero otherwise.

Releases

3 releases since Debian 4.0 (Etch); the text changed 2 times.

  1. 4.0
  2. 5.0
  3. 6.0

From linux-manual-2.6.32 2.6.32-48squeeze6 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.