Home
last modified time | relevance | path

Searched refs:__sl_cas (Results 1 – 1 of 1) sorted by relevance

/linux/arch/sh/include/asm/
H A Dspinlock-cas.h13 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) in __sl_cas() function
30 while (!__sl_cas(&lock->lock, 1, 0)); in arch_spin_lock()
35 __sl_cas(&lock->lock, 0, 1); in arch_spin_unlock()
40 return __sl_cas(&lock->lock, 1, 0); in arch_spin_trylock()
56 while (!old || __sl_cas(&rw->lock, old, old-1) != old); in arch_read_lock()
63 while (__sl_cas(&rw->lock, old, old+1) != old); in arch_read_unlock()
68 while (__sl_cas(&rw->lock, RW_LOCK_BIAS, 0) != RW_LOCK_BIAS); in arch_write_lock()
73 __sl_cas(&rw->lock, 0, RW_LOCK_BIAS); in arch_write_unlock()
80 while (old && __sl_cas(&rw->lock, old, old-1) != old); in arch_read_trylock()
86 return __sl_cas(&rw->lock, RW_LOCK_BIAS, 0) == RW_LOCK_BIAS; in arch_write_trylock()