12#ifndef ROOT_TVirtualMutex
13#define ROOT_TVirtualMutex
90#if defined (_REENTRANT) || defined (WIN32)
92#define R__LOCKGUARD(mutex) TLockGuard _R__UNIQUE_(R__guard)(mutex)
93#define R__LOCKGUARD2(mutex) \
94 if (gGlobalMutex && !mutex) { \
95 gGlobalMutex->Lock(); \
97 mutex = gGlobalMutex->Factory(kTRUE); \
98 gGlobalMutex->UnLock(); \
101#define R__LOCKGUARD_NAMED(name,mutex) TLockGuard _NAME2_(R__guard,name)(mutex)
102#define R__LOCKGUARD_UNLOCK(name) _NAME2_(R__guard,name).UnLock()
104#define R__LOCKGUARD(mutex) (void)(mutex); { }
105#define R__LOCKGUARD_NAMED(name,mutex) (void)(mutex); { }
106#define R__LOCKGUARD2(mutex) (void)(mutex); { }
107#define R__LOCKGUARD_UNLOCK(name) { }
111#define R__LOCKGUARD_IMT(mutex) R__LOCKGUARD(ROOT::Internal::IsParBranchProcessingEnabled() ? mutex : nullptr)
112#define R__LOCKGUARD_IMT2(mutex) \
113 if (gGlobalMutex && !mutex && ROOT::Internal::IsParBranchProcessingEnabled()) { \
114 gGlobalMutex->Lock(); \
116 mutex = gGlobalMutex->Factory(kTRUE); \
117 gGlobalMutex->UnLock(); \
119 R__LOCKGUARD_IMT(mutex)
121#define R__LOCKGUARD_IMT(mutex) { }
122#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