Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
atomic.h File Reference
#include <asm/atomic.h>
#include <asm-generic/atomic-long.h>

Go to the source code of this file.

Macros

#define atomic_inc_not_zero(v)   atomic_add_unless((v), 1, 0)
 

Macro Definition Documentation

#define atomic_inc_not_zero (   v)    atomic_add_unless((v), 1, 0)

atomic_inc_not_zero - increment unless the number is zero : pointer of type atomic_t

Atomically increments by 1, so long as is non-zero. Returns non-zero if was non-zero, and zero otherwise.

Definition at line 28 of file atomic.h.