Searched refs:SAFE_PTHREAD (Results 1 – 2 of 2) sorted by relevance
252 #define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ macro264 Mutex::~Mutex() { if (destroy_) SAFE_PTHREAD(pthread_rwlock_destroy); } in ~Mutex()265 void Mutex::Lock() { SAFE_PTHREAD(pthread_rwlock_wrlock); } in Lock()266 void Mutex::Unlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } in Unlock()271 void Mutex::ReaderLock() { SAFE_PTHREAD(pthread_rwlock_rdlock); } in ReaderLock()272 void Mutex::ReaderUnlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } in ReaderUnlock()273 #undef SAFE_PTHREAD277 #define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ macro289 Mutex::~Mutex() { if (destroy_) SAFE_PTHREAD(pthread_mutex_destroy); } in ~Mutex()290 void Mutex::Lock() { SAFE_PTHREAD(pthread_mutex_lock); } in Lock()[all …]
78 #define SAFE_PTHREAD(fncall) \ macro83 Mutex::Mutex() { SAFE_PTHREAD(pthread_rwlock_init(&mutex_, NULL)); } in Mutex()84 Mutex::~Mutex() { SAFE_PTHREAD(pthread_rwlock_destroy(&mutex_)); } in ~Mutex()85 void Mutex::Lock() { SAFE_PTHREAD(pthread_rwlock_wrlock(&mutex_)); } in Lock()86 void Mutex::Unlock() { SAFE_PTHREAD(pthread_rwlock_unlock(&mutex_)); } in Unlock()87 void Mutex::ReaderLock() { SAFE_PTHREAD(pthread_rwlock_rdlock(&mutex_)); } in ReaderLock()88 void Mutex::ReaderUnlock() { SAFE_PTHREAD(pthread_rwlock_unlock(&mutex_)); } in ReaderUnlock()90 #undef SAFE_PTHREAD