12 #ifndef TMCAUTOLOCK_HH 13 #define TMCAUTOLOCK_HH 88 #define TMCMULTITHREADED 1 91 #if defined(TMCMULTITHREADED) 95 #define TMCMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER 96 #define TMCMUTEXLOCK pthread_mutex_lock 97 #define TMCMUTEXUNLOCK pthread_mutex_unlock 103 #define TMCMUTEX_INITIALIZER 1 104 #define TMCMUTEXLOCK fake_mutex_lock_unlock 105 #define TMCMUTEXUNLOCK fake_mutex_lock_unlock 117 template <
class M,
typename L,
typename U>
163 #endif // TMCAUTOLOCK_HH int fake_mutex_lock_unlock(TMCMutex *)
Template classe which provides a mechanism to create a mutex and locks/unlocks it.
TMCImpMutexAutoLock TMCAutoLock
static constexpr double L
virtual ~TMCTemplateAutoLock()
TMCImpMutexAutoLock(TMCMutex *mtx)
int(* thread_lock)(TMCMutex *)
int(* thread_unlock)(TMCMutex *)
Realization of TMCTemplateAutoLock with TMCMutex.
TMCTemplateAutoLock & operator=(const TMCTemplateAutoLock &rhs)
TMCTemplateAutoLock(M *mtx, L l, U u)