25 #ifndef __MUTEXSINGLETON__
26 #define __MUTEXSINGLETON__
29 #include <Base/Debug/Error.hh>
44 #ifdef BIASASSERT_ISACTIVE
45 BIASASSERT(pthread_mutex_init(&m, NULL) == 0);
47 pthread_mutex_init(&m, NULL);
54 int Lock() {
return pthread_mutex_lock(&m);}
55 int Unlock() {
return pthread_mutex_unlock(&m);}
62 #endif //__MUTEXSINGLETON__
Wrapper for pthread mutex for use with 'automatic' initialization.