Lines Matching full:sema
76 cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
77 if (!cond->sema) {
97 result = CloseHandle(cond->sema);
101 cond->sema = 0;
124 result = SignalObjectAndWait(cond->sema, cond->continue_event,
143 result = ReleaseSemaphore(cond->sema, cond->waiters, NULL);
173 WaitForSingleObject(cond->sema, INFINITE);
198 sem->sema = CreateSemaphore(NULL, init, LONG_MAX, NULL);
203 CloseHandle(sem->sema);
208 ReleaseSemaphore(sem->sema, 1, NULL);
213 int rc = WaitForSingleObject(sem->sema, ms);
225 if (WaitForSingleObject(sem->sema, INFINITE) != WAIT_OBJECT_0) {