Lines Matching refs:old
212 unsigned old, new; in atomic_fetch_add() local
216 old = atomic->a_u.au_uint; in atomic_fetch_add()
217 new = old + value; in atomic_fetch_add()
218 } while (atomic_cas_uint(&atomic->a_u.au_uint, old, new) != old); in atomic_fetch_add()
221 return old; in atomic_fetch_add()
233 unsigned old, new; in atomic_fetch_xor() local
237 old = atomic->a_u.au_uint; in atomic_fetch_xor()
238 new = old ^ value; in atomic_fetch_xor()
239 } while (atomic_cas_uint(&atomic->a_u.au_uint, old, new) != old); in atomic_fetch_xor()
242 return old; in atomic_fetch_xor()
286 int old; in atomic_xchg() local
289 old = (int)atomic_swap_uint(&atomic->a_u.au_uint, (unsigned)new); in atomic_xchg()
292 return old; in atomic_xchg()
298 int old; in atomic_cmpxchg() local
306 old = (int)atomic_cas_uint(&atomic->a_u.au_uint, (unsigned)expect, in atomic_cmpxchg()
310 return old; in atomic_cmpxchg()
379 uint64_t old; in atomic64_xchg() local
382 old = atomic_swap_64(&a->a_v, new); in atomic64_xchg()
385 return old; in atomic64_xchg()
391 uint64_t old; in atomic64_cmpxchg() local
399 old = atomic_cas_64(&atomic->a_v, expect, new); in atomic64_cmpxchg()
402 return old; in atomic64_cmpxchg()
484 long old; in atomic_long_xchg() local
487 old = (long)atomic_swap_ulong(&a->al_v, (unsigned long)new); in atomic_long_xchg()
490 return old; in atomic_long_xchg()
496 long old; in atomic_long_cmpxchg() local
504 old = (long)atomic_cas_ulong(&a->al_v, (unsigned long)expect, in atomic_long_cmpxchg()
508 return old; in atomic_long_cmpxchg()