Lines Matching refs:addr
37 * Return the old value of addr->val.
40 atomic_cmpxchg(atomic_t *addr, int oldval, int newval)
42 return __sync_val_compare_and_swap(&addr->val, oldval, newval);
47 * @addr: Address of the variable to increment
49 * Return the new value of addr->val.
52 atomic_inc(atomic_t *addr)
54 return __sync_add_and_fetch(&addr->val, 1);
59 * @addr: Address of the variable to decrement
61 * Return the new value of addr-val.
64 atomic_dec(atomic_t *addr)
66 return __sync_sub_and_fetch(&addr->val, 1);
71 * @addr: Address of the variable to set
74 * Return the new value of addr->val.
77 atomic_set(atomic_t *addr, int newval)
79 addr->val = newval;