12 #ifndef ROOT_TVirtualMutex
13 #define ROOT_TVirtualMutex
92 #if defined (_REENTRANT) || defined (WIN32)
94 #define R__LOCKGUARD(mutex) TLockGuard _R__UNIQUE_(R__guard)(mutex)
95 #define R__LOCKGUARD2(mutex) \
96 if (gGlobalMutex && !mutex) { \
97 gGlobalMutex->Lock(); \
99 mutex = gGlobalMutex->Factory(kTRUE); \
100 gGlobalMutex->UnLock(); \
103 #define R__LOCKGUARD_NAMED(name,mutex) TLockGuard _NAME2_(R__guard,name)(mutex)
104 #define R__LOCKGUARD_UNLOCK(name) _NAME2_(R__guard,name).UnLock()
106 #define R__LOCKGUARD(mutex) if (mutex) { }
107 #define R__LOCKGUARD_NAMED(name,mutex) if (mutex) { }
108 #define R__LOCKGUARD2(mutex) if (mutex) { }
109 #define R__LOCKGUARD_UNLOCK(name) { }
virtual TVirtualMutex * Factory(Bool_t=kFALSE)=0
virtual Int_t TryLock()=0
This class implements a mutex interface.
TLockGuard(const TLockGuard &)
#define ClassDef(name, id)
R__EXTERN TVirtualMutex * gGlobalMutex
TLockGuard(TVirtualMutex *mutex)
#define ClassDefNV(name, id)
TVirtualMutex(Bool_t=kFALSE)
Mother of all ROOT objects.
TLockGuard & operator=(const TLockGuard &)
virtual Int_t CleanUp()=0