Lines Matching refs:addr
33 * Return the old value of addr->val.
36 atomic_cmpxchg(atomic_t *addr, int oldval, int newval)
38 return __sync_val_compare_and_swap(&addr->val, oldval, newval);
43 * @addr: Address of the variable to increment
45 * Return the new value of addr->val.
48 atomic_inc(atomic_t *addr)
50 return __sync_add_and_fetch(&addr->val, 1);
55 * @addr: Address of the variable to decrement
57 * Return the new value of addr-val.
60 atomic_dec(atomic_t *addr)
62 return __sync_sub_and_fetch(&addr->val, 1);
67 * @addr: Address of the variable to set
70 * Return the new value of addr->val.
73 atomic_set(atomic_t *addr, int newval)
75 addr->val = newval;