Lines Matching refs:cnts
31 atomic_t cnts; member
54 rspin_until_writer_unlock(struct qrwlock *lock, u32 cnts) in rspin_until_writer_unlock() argument
56 while ((cnts & _QW_WMASK) == _QW_LOCKED) { in rspin_until_writer_unlock()
58 cnts = atomic_read_acquire(&lock->cnts); in rspin_until_writer_unlock()
67 void queued_read_lock_slowpath(struct qrwlock *lock, u32 cnts) in queued_read_lock_slowpath() argument
81 rspin_until_writer_unlock(lock, cnts); in queued_read_lock_slowpath()
84 atomic_sub(_QR_BIAS, &lock->cnts); in queued_read_lock_slowpath()
96 cnts = atomic_add_return_acquire(_QR_BIAS, &lock->cnts) - _QR_BIAS; in queued_read_lock_slowpath()
97 rspin_until_writer_unlock(lock, cnts); in queued_read_lock_slowpath()
112 u32 cnts; in queued_write_lock_slowpath() local
118 if (!atomic_read(&lock->cnts) && in queued_write_lock_slowpath()
119 (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) in queued_write_lock_slowpath()
138 cnts = atomic_read(&lock->cnts); in queued_write_lock_slowpath()
139 if ((cnts == _QW_WAITING) && in queued_write_lock_slowpath()
140 (atomic_cmpxchg_acquire(&lock->cnts, _QW_WAITING, in queued_write_lock_slowpath()