Lines Matching refs:runcount
150 lock->runcount = 0;
158 /* Test whether only readers are currently running, and whether the runcount
164 while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
171 lock->runcount++;
182 while (!(lock->runcount == 0))
191 lock->runcount--; /* runcount becomes -1 */
201 if (lock->runcount < 0)
204 if (!(lock->runcount == -1))
206 lock->runcount = 0;
211 if (!(lock->runcount > 0))
213 lock->runcount--;
215 if (lock->runcount == 0)
656 lock->runcount = 0;
675 /* Test whether only readers are currently running, and whether the runcount
677 if (!(lock->runcount + 1 > 0))
692 removed us from the waiting_readers, incremented lock->runcount. */
693 if (!(lock->runcount > 0))
706 while (!(lock->runcount + 1 > 0));
709 lock->runcount++;
729 if (!(lock->runcount == 0))
744 removed us from the waiting_writers, set lock->runcount = -1. */
745 if (!(lock->runcount == -1))
758 while (!(lock->runcount == 0));
761 lock->runcount--; /* runcount becomes -1 */
771 if (lock->runcount < 0)
774 if (!(lock->runcount == -1))
776 lock->runcount = 0;
781 if (!(lock->runcount > 0))
783 lock->runcount--;
785 if (lock->runcount == 0)
792 lock->runcount--;
798 lock->runcount += lock->waiting_readers.count;
810 if (lock->runcount != 0)