Home | History | Annotate | Download | only in common

Lines Matching full:condition

132 umtx_condBroadcast(UConditionVar *condition) {
136 if (condition->fWaitCount == 0) {
139 ResetEvent(condition->fExitGate);
140 SetEvent(condition->fEntryGate);
144 umtx_condSignal(UConditionVar *condition) {
146 // Once ICU drops support for Windows XP and Server 2003, ICU Condition Variables will be
153 umtx_condWait(UConditionVar *condition, UMutex *mutex) {
154 if (condition->fEntryGate == NULL) {
157 // running here with the same condition variable.
159 U_ASSERT(condition->fExitGate == NULL);
160 condition->fEntryGate = CreateEvent(NULL, // Security Attributes
164 U_ASSERT(condition->fEntryGate != NULL);
165 condition->fExitGate = CreateEvent(NULL, TRUE, TRUE, NULL);
166 U_ASSERT(condition->fExitGate != NULL);
169 condition->fWaitCount++;
171 WaitForSingleObject(condition->fEntryGate, INFINITE);
173 condition->fWaitCount--;
174 if (condition->fWaitCount == 0) {
177 ResetEvent(condition->fEntryGate);
178 SetEvent(condition->fExitGate);
181 WaitForSingleObject(condition->fExitGate, INFINITE);
288 // Some threads may be waiting on the condition, requiring the broadcast wakeup.