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