Lines Matching refs:runcount
151 lock->runcount = 0;
159 /* Test whether only readers are currently running, and whether the runcount
165 while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
172 lock->runcount++;
183 while (!(lock->runcount == 0))
192 lock->runcount--; /* runcount becomes -1 */
202 if (lock->runcount < 0)
205 if (!(lock->runcount == -1))
207 lock->runcount = 0;
212 if (!(lock->runcount > 0))
214 lock->runcount--;
216 if (lock->runcount == 0)
657 lock->runcount = 0;
676 /* Test whether only readers are currently running, and whether the runcount
678 if (!(lock->runcount + 1 > 0))
693 removed us from the waiting_readers, incremented lock->runcount. */
694 if (!(lock->runcount > 0))
707 while (!(lock->runcount + 1 > 0));
710 lock->runcount++;
730 if (!(lock->runcount == 0))
745 removed us from the waiting_writers, set lock->runcount = -1. */
746 if (!(lock->runcount == -1))
759 while (!(lock->runcount == 0));
762 lock->runcount--; /* runcount becomes -1 */
772 if (lock->runcount < 0)
775 if (!(lock->runcount == -1))
777 lock->runcount = 0;
782 if (!(lock->runcount > 0))
784 lock->runcount--;
786 if (lock->runcount == 0)
793 lock->runcount--;
799 lock->runcount += lock->waiting_readers.count;
811 if (lock->runcount != 0)