12#ifndef ROOT_TVirtualMutex
13#define ROOT_TVirtualMutex
97#if defined (_REENTRANT) || defined (WIN32)
99#define R__LOCKGUARD(mutex) TLockGuard _R__UNIQUE_(R__guard)(mutex)
100#define R__LOCKGUARD2(mutex) \
101 if (gGlobalMutex && !mutex) { \
102 gGlobalMutex->Lock(); \
104 mutex = gGlobalMutex->Factory(kTRUE); \
105 gGlobalMutex->UnLock(); \
108#define R__LOCKGUARD_NAMED(name,mutex) TLockGuard _NAME2_(R__guard,name)(mutex)
109#define R__LOCKGUARD_UNLOCK(name) _NAME2_(R__guard,name).UnLock()
112#define R__LOCKGUARD(mutex) (void)(mutex); { }
113#define R__LOCKGUARD_NAMED(name,mutex) (void)(mutex); { }
114#define R__LOCKGUARD2(mutex) (void)(mutex); { }
115#define R__LOCKGUARD_UNLOCK(name) { }
119#define R__LOCKGUARD_IMT(mutex) R__LOCKGUARD(ROOT::Internal::IsParBranchProcessingEnabled() ? mutex : nullptr)
120#define R__LOCKGUARD_IMT2(mutex) \
121 if (gGlobalMutex && !mutex && ROOT::Internal::IsParBranchProcessingEnabled()) { \
122 gGlobalMutex->Lock(); \
124 mutex = gGlobalMutex->Factory(kTRUE); \
125 gGlobalMutex->UnLock(); \
127 R__LOCKGUARD_IMT(mutex)
129#define R__LOCKGUARD_IMT(mutex) { }
130#define R__LOCKGUARD_IMT2(mutex) { }
#define ClassDef(name, id)
#define ClassDefNV(name, id)
R__EXTERN TVirtualMutex * gGlobalMutex
TLockGuard & operator=(const TLockGuard &)=delete
TLockGuard(const TLockGuard &)=delete
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