Lines Matching full: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.
99 waiting. It corresponds to listing 2 in:
148 cv->waiting = 0; in PyCOND_INIT()
165 cv->waiting++; in _PyCOND_WAIT_MS()
174 --cv->waiting; in _PyCOND_WAIT_MS()
179 * just means an extra spurious wakeup for a waiting thread. in _PyCOND_WAIT_MS()
180 * ('waiting' corresponds to the semaphore's "negative" count and in _PyCOND_WAIT_MS()
181 * we may end up with e.g. (waiting == -1 && sem.count == 1). When in _PyCOND_WAIT_MS()
183 * adjusted it to (waiting == 0 && sem.count == 0). in _PyCOND_WAIT_MS()
212 if (cv->waiting > 0) { in PyCOND_SIGNAL()
213 /* notifying thread decreases the cv->waiting count so that in PyCOND_SIGNAL()
217 cv->waiting--; in PyCOND_SIGNAL()
226 int waiting = cv->waiting; in PyCOND_BROADCAST() local
227 if (waiting > 0) { in PyCOND_BROADCAST()
228 cv->waiting = 0; in PyCOND_BROADCAST()
229 return ReleaseSemaphore(cv->sem, waiting, NULL) ? 0 : -1; in PyCOND_BROADCAST()