#include <linux/types.h>
#include <asm/cmpxchg.h>
Go to the source code of this file.
|
#define | _atomic_spin_lock_irqsave(l, f) do { local_irq_save(f); } while (0) |
|
#define | _atomic_spin_unlock_irqrestore(l, f) do { local_irq_restore(f); } while (0) |
|
#define | atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) |
|
#define | atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
|
#define | atomic_add(i, v) ((void)(__atomic_add_return( (i),(v)))) |
|
#define | atomic_sub(i, v) ((void)(__atomic_add_return(-(i),(v)))) |
|
#define | atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) |
|
#define | atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) |
|
#define | atomic_add_return(i, v) (__atomic_add_return( (i),(v))) |
|
#define | atomic_sub_return(i, v) (__atomic_add_return(-(i),(v))) |
|
#define | atomic_inc_return(v) (__atomic_add_return( 1,(v))) |
|
#define | atomic_dec_return(v) (__atomic_add_return( -1,(v))) |
|
#define | atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) |
|
#define | atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
|
#define | atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
|
#define | atomic_sub_and_test(i, v) (atomic_sub_return((i),(v)) == 0) |
|
#define | ATOMIC_INIT(i) { (i) } |
|
#define | smp_mb__before_atomic_dec() smp_mb() |
|
#define | smp_mb__after_atomic_dec() smp_mb() |
|
#define | smp_mb__before_atomic_inc() smp_mb() |
|
#define | smp_mb__after_atomic_inc() smp_mb() |
|
#define ATOMIC_INIT |
( |
|
i | ) |
{ (i) } |
#define smp_mb__after_atomic_dec |
( |
| ) |
smp_mb() |
#define smp_mb__after_atomic_inc |
( |
| ) |
smp_mb() |
#define smp_mb__before_atomic_dec |
( |
| ) |
smp_mb() |
#define smp_mb__before_atomic_inc |
( |
| ) |
smp_mb() |