Lines Matching refs:cnts
46 int cnts; in queued_read_trylock() local
48 cnts = atomic_read(&lock->cnts); in queued_read_trylock()
49 if (likely(!(cnts & _QW_WMASK))) { in queued_read_trylock()
50 cnts = (u32)atomic_add_return_acquire(_QR_BIAS, &lock->cnts); in queued_read_trylock()
51 if (likely(!(cnts & _QW_WMASK))) in queued_read_trylock()
53 atomic_sub(_QR_BIAS, &lock->cnts); in queued_read_trylock()
65 int cnts; in queued_write_trylock() local
67 cnts = atomic_read(&lock->cnts); in queued_write_trylock()
68 if (unlikely(cnts)) in queued_write_trylock()
71 return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, in queued_write_trylock()
80 int cnts; in queued_read_lock() local
82 cnts = atomic_add_return_acquire(_QR_BIAS, &lock->cnts); in queued_read_lock()
83 if (likely(!(cnts & _QW_WMASK))) in queued_read_lock()
96 int cnts = 0; in queued_write_lock() local
98 if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED))) in queued_write_lock()
113 (void)atomic_sub_return_release(_QR_BIAS, &lock->cnts); in queued_read_unlock()