Lines Matching full:readers
104 read_count += *per_cpu_ptr(lock->readers, cpu); in pcpu_read_count()
154 if (type == SIX_LOCK_read && lock->readers) { in __do_six_trylock()
156 this_cpu_inc(*lock->readers); /* signal that we own lock */ in __do_six_trylock()
163 this_cpu_sub(*lock->readers, !ret); in __do_six_trylock()
171 } else if (type == SIX_LOCK_write && lock->readers) { in __do_six_trylock()
576 lock->readers) { in do_six_unlock_type()
578 this_cpu_dec(*lock->readers); in do_six_unlock_type()
664 if (!lock->readers) { in six_lock_tryupgrade()
672 if (lock->readers) in six_lock_tryupgrade()
673 this_cpu_dec(*lock->readers); in six_lock_tryupgrade()
729 if (lock->readers) { in six_lock_increment()
730 this_cpu_inc(*lock->readers); in six_lock_increment()
785 ret.n[SIX_LOCK_read] = !lock->readers in six_lock_counts()
798 * @lock: lock to add/subtract readers for
818 if (lock->readers) { in six_lock_readers_add()
819 this_cpu_add(*lock->readers, nr); in six_lock_readers_add()
837 WARN_ON(lock->readers && pcpu_read_count(lock)); in six_lock_exit()
840 free_percpu(lock->readers); in six_lock_exit()
841 lock->readers = NULL; in six_lock_exit()
866 * failure if they wish by checking lock->readers, but generally in __six_lock_init()
869 lock->readers = alloc_percpu(unsigned); in __six_lock_init()