Lines Matching refs:old
143 atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
145 int ret = old; in atomic_cmpxchg()
150 if (ret != old) in atomic_cmpxchg()
172 #define cmpxchg(ptr, old, new) ({ \ argument
179 } __ret = { .val = (old) }, __new = { .val = (new) }; \
191 __ret.u8, __new.u8[0]) && __ret.val == (old)) \
198 __ret.u16, __new.u16[0]) && __ret.val == (old)) \
204 __ret.u32, __new.u32[0]) && __ret.val == (old)) \
210 __ret.u64, __new.u64[0]) && __ret.val == (old)) \
270 int old; in atomic_dec_if_positive() local
272 old = atomic_read(v); in atomic_dec_if_positive()
274 retval = old - 1; in atomic_dec_if_positive()
277 if (likely(atomic_fcmpset_int(&v->counter, &old, retval))) in atomic_dec_if_positive()
286 int c, old; \
289 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
290 c = old; \
296 int c, old; \
299 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
300 c = old; \