Lines Matching defs:cond
32 isc_condition_init(isc_condition_t *cond) {
35 REQUIRE(cond != NULL);
37 cond->waiters = 0;
46 cond->events[LSIGNAL] = h;
52 ISC_LIST_INIT(cond->threadlist);
98 find_thread_condition(unsigned long thrd, isc_condition_t *cond,
108 for (threadcond = ISC_LIST_HEAD(cond->threadlist);
121 return (register_thread(thrd, cond, threadcondp));
125 isc_condition_signal(isc_condition_t *cond) {
131 REQUIRE(cond != NULL);
133 if (!SetEvent(cond->events[LSIGNAL])) {
142 isc_condition_broadcast(isc_condition_t *cond) {
151 REQUIRE(cond != NULL);
156 for (threadcond = ISC_LIST_HEAD(cond->threadlist);
171 isc_condition_destroy(isc_condition_t *cond) {
175 REQUIRE(cond != NULL);
176 REQUIRE(cond->waiters == 0);
178 (void)CloseHandle(cond->events[LSIGNAL]);
183 threadcond = ISC_LIST_HEAD(cond->threadlist);
187 DEQUEUE(cond->threadlist, threadcond, link);
206 wait(isc_condition_t *cond, isc_mutex_t *mutex, DWORD milliseconds) {
214 tresult = find_thread_condition(isc_thread_self(), cond, &threadcond);
218 cond->waiters++;
223 cond->waiters--;
235 isc_condition_wait(isc_condition_t *cond, isc_mutex_t *mutex) {
236 return (wait(cond, mutex, INFINITE));
240 isc_condition_waituntil(isc_condition_t *cond, isc_mutex_t *mutex,
257 return (wait(cond, mutex, milliseconds));