Lines Matching refs:old
146 atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
148 int ret = old; in atomic_cmpxchg()
153 if (ret != old) in atomic_cmpxchg()
173 #define cmpxchg(ptr, old, new) ({ \ argument
180 } __ret = { .val = (old) }, __new = { .val = (new) }; \
192 __ret.u8, __new.u8[0]) && __ret.val == (old)) \
199 __ret.u16, __new.u16[0]) && __ret.val == (old)) \
205 __ret.u32, __new.u32[0]) && __ret.val == (old)) \
211 __ret.u64, __new.u64[0]) && __ret.val == (old)) \
294 int old; in atomic_dec_if_positive() local
296 old = atomic_read(v); in atomic_dec_if_positive()
298 retval = old - 1; in atomic_dec_if_positive()
301 if (likely(atomic_fcmpset_int(&v->counter, &old, retval))) in atomic_dec_if_positive()
310 int c, old; \
313 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
314 c = old; \
320 int c, old; \
323 while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
324 c = old; \