Lines Matching defs:waiting
22 * already waiting in a PyCOND_WAIT() call. It _could_ cause
25 * The same applies to PyCOND_BROADCAST(), if N threads are waiting
27 * those already waiting.
98 waiting. It corresponds to listing 2 in:
147 cv->waiting = 0;
164 cv->waiting++;
173 --cv->waiting;
178 * just means an extra spurious wakeup for a waiting thread.
179 * ('waiting' corresponds to the semaphore's "negative" count and
180 * we may end up with e.g. (waiting == -1 && sem.count == 1). When
182 * adjusted it to (waiting == 0 && sem.count == 0).
211 if (cv->waiting > 0) {
212 /* notifying thread decreases the cv->waiting count so that
216 cv->waiting--;
225 int waiting = cv->waiting;
226 if (waiting > 0) {
227 cv->waiting = 0;
228 return ReleaseSemaphore(cv->sem, waiting, NULL) ? 0 : -1;