Lines Matching refs:old
148 atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
150 int ret = old; in atomic_cmpxchg()
155 if (ret != old) in atomic_cmpxchg()
177 #define cmpxchg(ptr, old, new) ({ \ argument
184 } __ret = { .val = (old) }, __new = { .val = (new) }; \
196 __ret.u8, __new.u8[0]) && __ret.val == (old)) \
203 __ret.u16, __new.u16[0]) && __ret.val == (old)) \
209 __ret.u32, __new.u32[0]) && __ret.val == (old)) \
215 __ret.u64, __new.u64[0]) && __ret.val == (old)) \
275 int old; in atomic_dec_if_positive() local
277 old = atomic_read(v); in atomic_dec_if_positive()
279 retval = old - 1; in atomic_dec_if_positive()
282 if (likely(atomic_fcmpset_int(&v->counter, &old, retval))) in atomic_dec_if_positive()
291 int c, old; \
294 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
295 c = old; \
301 int c, old; \
304 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
305 c = old; \