|
ROOT
Reference Guide |
|
Go to the documentation of this file.
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) { }
virtual TVirtualMutex * Factory(Bool_t=kFALSE)=0
virtual Int_t TryLock()=0
This class implements a mutex interface.
R__EXTERN TVirtualMutex * gGlobalMutex
TVirtualMutex(Bool_t=kFALSE)
TLockGuard(const TLockGuard &)
TLockGuard(TVirtualMutex *mutex)
TLockGuard & operator=(const TLockGuard &)
#define ClassDef(name, id)
virtual Int_t CleanUp()=0
#define ClassDefNV(name, id)