Lines Matching refs:ok
132 int ok = 1;
136 ok &= (CloseHandle(condition->waiting_sem_) != 0);
137 ok &= (CloseHandle(condition->received_sem_) != 0);
138 ok &= (CloseHandle(condition->signal_event_) != 0);
140 return !ok;
162 int ok = 1;
168 ok = SetEvent(condition->signal_event_);
171 ok &= (WaitForSingleObject(condition->received_sem_, INFINITE) !=
175 return !ok;
180 int ok;
182 ok = SleepConditionVariableCS(condition, mutex, INFINITE);
190 ok = (WaitForSingleObject(condition->signal_event_, INFINITE) ==
192 ok &= ReleaseSemaphore(condition->received_sem_, 1, NULL);
195 return !ok;
212 while (worker->status_ == OK) { // wait in idling mode
217 worker->status_ = OK;
237 if (worker->status_ >= OK) {
239 while (worker->status_ != OK) {
243 if (new_status != OK) {
262 ChangeState(worker, OK);
264 assert(worker->status_ <= OK);
269 int ok = 1;
271 if (worker->status_ < OK) {
285 ok = !pthread_create(&worker->impl_->thread_, NULL, ThreadLoop, worker);
286 if (ok) worker->status_ = OK;
288 if (!ok) {
297 worker->status_ = OK;
299 } else if (worker->status_ > OK) {
300 ok = Sync(worker);
302 assert(!ok || (worker->status_ == OK));
303 return ok;