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) (void)(mutex); { }
107#define R__LOCKGUARD_NAMED(name,mutex) (void)(mutex); { }
108#define R__LOCKGUARD2(mutex) (void)(mutex); { }
109#define R__LOCKGUARD_UNLOCK(name) { }
113#define R__LOCKGUARD_IMT(mutex) R__LOCKGUARD(ROOT::Internal::IsParBranchProcessingEnabled() ? mutex : nullptr)
114#define R__LOCKGUARD_IMT2(mutex) \
115 if (gGlobalMutex && !mutex && ROOT::Internal::IsParBranchProcessingEnabled()) { \
116 gGlobalMutex->Lock(); \
118 mutex = gGlobalMutex->Factory(kTRUE); \
119 gGlobalMutex->UnLock(); \
121 R__LOCKGUARD_IMT(mutex)
123#define R__LOCKGUARD_IMT(mutex) { }
124#define R__LOCKGUARD_IMT2(mutex) { }
#define ClassDef(name, id)
#define ClassDefNV(name, id)
R__EXTERN TVirtualMutex * gGlobalMutex
TLockGuard & operator=(const TLockGuard &)
TLockGuard(const TLockGuard &)
TLockGuard(TVirtualMutex *mutex)
This class implements a mutex interface.
TVirtualMutex(Bool_t=kFALSE)
virtual Int_t CleanUp()=0
virtual Int_t TryLock()=0
virtual TVirtualMutex * Factory(Bool_t=kFALSE)=0