Lines Matching refs:readers
104 read_count += *per_cpu_ptr(lock->readers, cpu);
154 if (type == SIX_LOCK_read && lock->readers) {
156 this_cpu_inc(*lock->readers); /* signal that we own lock */
163 this_cpu_sub(*lock->readers, !ret);
171 } else if (type == SIX_LOCK_write && lock->readers) {
570 lock->readers) {
572 this_cpu_dec(*lock->readers);
658 if (!lock->readers) {
666 if (lock->readers)
667 this_cpu_dec(*lock->readers);
723 if (lock->readers) {
724 this_cpu_inc(*lock->readers);
779 ret.n[SIX_LOCK_read] = !lock->readers
792 * @lock: lock to add/subtract readers for
812 if (lock->readers) {
813 this_cpu_add(*lock->readers, nr);
831 WARN_ON(lock->readers && pcpu_read_count(lock));
834 free_percpu(lock->readers);
835 lock->readers = NULL;
860 * failure if they wish by checking lock->readers, but generally
863 lock->readers = alloc_percpu(unsigned);