Lines Matching refs:SAFE_PTHREAD
106 #define SAFE_PTHREAD(fncall) do { if ((fncall) != 0) abort(); } while (0) macro
108 Mutex::Mutex() { SAFE_PTHREAD(pthread_rwlock_init(&mutex_, NULL)); } in Mutex()
109 Mutex::~Mutex() { SAFE_PTHREAD(pthread_rwlock_destroy(&mutex_)); } in ~Mutex()
110 void Mutex::Lock() { SAFE_PTHREAD(pthread_rwlock_wrlock(&mutex_)); } in Lock()
111 void Mutex::Unlock() { SAFE_PTHREAD(pthread_rwlock_unlock(&mutex_)); } in Unlock()
113 void Mutex::ReaderLock() { SAFE_PTHREAD(pthread_rwlock_rdlock(&mutex_)); } in ReaderLock()
114 void Mutex::ReaderUnlock() { SAFE_PTHREAD(pthread_rwlock_unlock(&mutex_)); } in ReaderUnlock()
116 #undef SAFE_PTHREAD
121 #define SAFE_PTHREAD(fncall) do { if ((fncall) != 0) abort(); } while (0) macro
123 Mutex::Mutex() { SAFE_PTHREAD(pthread_mutex_init(&mutex_, NULL)); } in Mutex()
124 Mutex::~Mutex() { SAFE_PTHREAD(pthread_mutex_destroy(&mutex_)); } in ~Mutex()
125 void Mutex::Lock() { SAFE_PTHREAD(pthread_mutex_lock(&mutex_)); } in Lock()
126 void Mutex::Unlock() { SAFE_PTHREAD(pthread_mutex_unlock(&mutex_)); } in Unlock()
130 #undef SAFE_PTHREAD