Linux Kernel
3.7.1
|
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/cmpxchg.h>
#include <arch/atomic.h>
Go to the source code of this file.
Macros | |
#define | ATOMIC_INIT(i) { (i) } |
#define | atomic_read(v) (*(volatile int *)&(v)->counter) |
#define | atomic_set(v, i) (((v)->counter) = (i)) |
#define | atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) |
#define | atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
#define | smp_mb__before_atomic_dec() barrier() |
#define | smp_mb__after_atomic_dec() barrier() |
#define | smp_mb__before_atomic_inc() barrier() |
#define | smp_mb__after_atomic_inc() barrier() |
#define atomic_add_negative | ( | a, | |
v | |||
) | (atomic_add_return((a), (v)) < 0) |