#include <linux/percpu.h>
#include <asm/assembler.h>
#include <asm/local.h>
Go to the source code of this file.
|
#define | LOCAL_INIT(i) { (i) } |
|
#define | local_read(l) ((l)->counter) |
|
#define | local_set(l, i) (((l)->counter) = (i)) |
|
#define | local_add(i, l) ((void) local_add_return((i), (l))) |
|
#define | local_sub(i, l) ((void) local_sub_return((i), (l))) |
|
#define | local_sub_and_test(i, l) (local_sub_return((i), (l)) == 0) |
|
#define | local_inc(l) ((void)local_inc_return(l)) |
|
#define | local_dec(l) ((void)local_dec_return(l)) |
|
#define | local_inc_and_test(l) (local_inc_return(l) == 0) |
|
#define | local_dec_and_test(l) (local_dec_return(l) == 0) |
|
#define | local_add_negative(i, l) (local_add_return((i), (l)) < 0) |
|
#define | local_cmpxchg(l, o, n) (cmpxchg_local(&((l)->counter), (o), (n))) |
|
#define | local_xchg(v, new) (xchg_local(&((l)->counter), new)) |
|
#define | local_inc_not_zero(l) local_add_unless((l), 1, 0) |
|
#define | smp_mb__before_local_dec() barrier() |
|
#define | smp_mb__after_local_dec() barrier() |
|
#define | smp_mb__before_local_inc() barrier() |
|
#define | smp_mb__after_local_inc() barrier() |
|
#define | __local_inc(l) ((l)->a.counter++) |
|
#define | __local_dec(l) ((l)->a.counter++) |
|
#define | __local_add(i, l) ((l)->a.counter += (i)) |
|
#define | __local_sub(i, l) ((l)->a.counter -= (i)) |
|
local_add - add long to local variable : long value to add : pointer of type local_t
Atomically adds to .
Definition at line 117 of file local.h.
local_add_negative - add and test if negative : pointer of type local_t : integer value to add
Atomically adds to and returns true if the result is negative, or false when result is greater than or equal to zero.
Definition at line 244 of file local.h.
local_dec_and_test - decrement and test : pointer of type local_t
Atomically decrements by 1 and returns true if the result is 0, or false for all other cases.
Definition at line 233 of file local.h.
local_inc_and_test - increment and test : pointer of type local_t
Atomically increments by 1 and returns true if the result is zero, or false for all other cases.
Definition at line 223 of file local.h.
#define LOCAL_INIT |
( |
|
i | ) |
{ (i) } |
local_sub - subtract the local variable : long value to subtract : pointer of type local_t
Atomically subtracts from .
Definition at line 126 of file local.h.
local_sub_and_test - subtract value from variable and test result : integer value to subtract : pointer of type local_t
Atomically subtracts from and returns true if the result is zero, or false for all other cases.
Definition at line 137 of file local.h.
#define smp_mb__after_local_dec |
( |
| ) |
barrier() |
#define smp_mb__after_local_inc |
( |
| ) |
barrier() |
#define smp_mb__before_local_dec |
( |
| ) |
barrier() |
#define smp_mb__before_local_inc |
( |
| ) |
barrier() |