Lines Matching refs:rc
28 ALWAYS_INLINE inline void FatalIfError(const char *f, int rc)
30 if (rc != 0) {
34 LOG(FATAL, COMMON) << f << " failed: " << Error(rc).ToString();
52 int rc = pthread_mutex_destroy(&mutex_);
53 FatalIfError("pthread_mutex_destroy", rc);
58 int rc = pthread_mutex_init(&mutex_, attrs);
59 FatalIfError("pthread_mutex_init", rc);
64 int rc = pthread_mutex_lock(&mutex_);
65 FatalIfError("pthread_mutex_lock", rc);
70 int rc = pthread_mutex_trylock(&mutex_);
71 if (rc == EBUSY) {
75 FatalIfError("pthread_mutex_trylock", rc);
82 int rc = pthread_mutex_unlock(&mutex_);
83 FatalIfError("pthread_mutex_unlock", rc);
96 int rc = pthread_rwlock_init(&rwlock_, nullptr);
97 FatalIfError("pthread_rwlock_init", rc);
102 int rc = pthread_rwlock_destroy(&rwlock_);
103 FatalIfError("pthread_rwlock_destroy", rc);
108 int rc = pthread_rwlock_rdlock(&rwlock_);
109 FatalIfError("pthread_rwlock_rdlock", rc);
114 int rc = pthread_rwlock_wrlock(&rwlock_);
115 FatalIfError("pthread_rwlock_wrlock", rc);
120 int rc = pthread_rwlock_tryrdlock(&rwlock_);
121 if (rc == EBUSY) {
125 FatalIfError("pthread_rwlock_tryrdlock", rc);
132 int rc = pthread_rwlock_trywrlock(&rwlock_);
133 if (rc == EBUSY) {
137 FatalIfError("pthread_rwlock_trywrlock", rc);
144 int rc = pthread_rwlock_unlock(&rwlock_);
145 FatalIfError("pthread_rwlock_unlock", rc);
150 int rc = pthread_cond_init(&cond_, nullptr);
151 FatalIfError("pthread_cond_init", rc);
156 int rc = pthread_cond_destroy(&cond_);
157 FatalIfError("pthread_cond_destroy", rc);
162 int rc = pthread_cond_signal(&cond_);
163 FatalIfError("pthread_cond_signal", rc);
168 int rc = pthread_cond_broadcast(&cond_);
169 FatalIfError("pthread_cond_broadcast", rc);
174 int rc = pthread_cond_wait(&cond_, &mutex->mutex_);
175 FatalIfError("pthread_cond_wait", rc);
201 int rc = pthread_cond_timedwait(&cond_, &mutex->mutex_, &abs_time);
202 if (rc != 0) {
203 if (rc == ETIMEDOUT) {
208 FatalIfError("pthread_cond_timedwait", rc);