__atomic_add_unless
Prev | Atomic and pointer manipulation | Next

## Name

__atomic_add_unless — add unless the number is already a given value

## Synopsis

`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.

## Description

Atomically adds `a` to `v`, so long as `v` was not already `u`. Returns the old value of `v`.

Prev | Up | Next
atomic_sub_return | Home | atomic_inc_short