Lines Matching refs:CHECK
152 CHECK(0 == pthread_mutex_init(&mu_, NULL));
153 CHECK(0 == pthread_cond_init(&cv_, NULL));
157 CHECK(0 == pthread_cond_destroy(&cv_));
158 CHECK(0 == pthread_mutex_destroy(&mu_));
160 void Lock() { CHECK(0 == pthread_mutex_lock(&mu_));}
165 CHECK(0 == pthread_cond_signal(&cv_));
167 CHECK(0 == pthread_mutex_unlock(&mu_));
220 CondVar() { CHECK(0 == pthread_cond_init(&cv_, NULL)); }
221 ~CondVar() { CHECK(0 == pthread_cond_destroy(&cv_)); }
222 void Wait(Mutex *mu) { CHECK(0 == pthread_cond_wait(&cv_, &mu->mu_)); }
230 void Signal() { CHECK(0 == pthread_cond_signal(&cv_)); }
231 void SignalAll() { CHECK(0 == pthread_cond_broadcast(&cv_)); }
242 RWLock() { CHECK(0 == pthread_rwlock_init(&mu_, NULL)); }
243 ~RWLock() { CHECK(0 == pthread_rwlock_destroy(&mu_)); }
244 void Lock() { CHECK(0 == pthread_rwlock_wrlock(&mu_)); }
245 void ReaderLock() { CHECK(0 == pthread_rwlock_rdlock(&mu_)); }
246 void Unlock() { CHECK(0 == pthread_rwlock_unlock(&mu_)); }
247 void ReaderUnlock() { CHECK(0 == pthread_rwlock_unlock(&mu_)); }
251 CHECK(EBUSY == res);
258 CHECK(EBUSY == res);
294 CHECK(0 == pthread_spin_init(&mu_, 0));
297 CHECK(0 == pthread_spin_destroy(&mu_));
300 CHECK(0 == pthread_spin_lock(&mu_));
303 CHECK(0 == pthread_spin_unlock(&mu_));
346 void Start() { CHECK(0 == pthread_create(&t_, NULL, (worker_t)ThreadBody, this));}
347 void Join() { CHECK(0 == pthread_join(t_, NULL));}
366 explicit Barrier(int n_threads) {CHECK(0 == pthread_barrier_init(&b_, 0, n_threads));}
367 ~Barrier() {CHECK(0 == pthread_barrier_destroy(&b_));}