27 #ifndef G2O_OPENMP_MUTEX 28 #define G2O_OPENMP_MUTEX 30 #include "g2o/config.h" 50 void lock() { omp_set_lock(&_lock); }
51 void unlock() { omp_unset_lock(&_lock); }
71 void lock() { assert(++
_cnt == 1 &&
"Locking already locked mutex");}
72 void unlock() { assert(--
_cnt == 0 &&
"Trying to unlock a mutex which is not locked");}
lock a mutex within a scope
ScopedOpenMPMutex(OpenMPMutex *mutex)
OpenMPMutex *const _mutex