Lines Matching refs:readers
61 for (r = atomic_read(&rwb->readers); r < 0;) { in rwbase_read_trylock()
62 if (likely(atomic_try_cmpxchg_acquire(&rwb->readers, &r, r + 1))) in rwbase_read_trylock()
79 if (atomic_read(&rwb->readers) != WRITER_BIAS) { in __rwbase_read_lock()
80 atomic_inc(&rwb->readers); in __rwbase_read_lock()
129 atomic_inc(&rwb->readers); in __rwbase_read_lock()
178 if (unlikely(atomic_dec_and_test(&rwb->readers))) in rwbase_read_unlock()
191 (void)atomic_add_return_release(READER_BIAS - bias, &rwb->readers); in __rwbase_write_unlock()
224 if (!atomic_read_acquire(&rwb->readers)) { in __rwbase_write_trylock()
225 atomic_set(&rwb->readers, WRITER_BIAS); in __rwbase_write_trylock()
243 atomic_sub(READER_BIAS, &rwb->readers); in rwbase_write_lock()
282 atomic_sub(READER_BIAS, &rwb->readers); in rwbase_write_trylock()