Lines Matching refs:old
13 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) in __sl_cas() argument
17 : "r"(old), "z"(p) in __sl_cas()
54 unsigned old; in arch_read_lock() local
55 do old = rw->lock; in arch_read_lock()
56 while (!old || __sl_cas(&rw->lock, old, old-1) != old); in arch_read_lock()
61 unsigned old; in arch_read_unlock() local
62 do old = rw->lock; in arch_read_unlock()
63 while (__sl_cas(&rw->lock, old, old+1) != old); in arch_read_unlock()
78 unsigned old; in arch_read_trylock() local
79 do old = rw->lock; in arch_read_trylock()
80 while (old && __sl_cas(&rw->lock, old, old-1) != old); in arch_read_trylock()
81 return !!old; in arch_read_trylock()