diff options
Diffstat (limited to 'src/OSSupport/CriticalSection.h')
-rw-r--r-- | src/OSSupport/CriticalSection.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/OSSupport/CriticalSection.h b/src/OSSupport/CriticalSection.h index 236a7d203..6ea18051a 100644 --- a/src/OSSupport/CriticalSection.h +++ b/src/OSSupport/CriticalSection.h @@ -12,7 +12,7 @@ class cCriticalSection public: void Lock(void); void Unlock(void); - + // IsLocked / IsLockedByCurrentThread are only used in ASSERT statements, but because of the changes with ASSERT they must always be defined // The fake versions (in Release) will not effect the program in any way #ifdef _DEBUG @@ -23,14 +23,14 @@ public: bool IsLocked(void) { return false; } bool IsLockedByCurrentThread(void) { return false; } #endif // _DEBUG - + private: #ifdef _DEBUG int m_IsLocked; // Number of times this CS is locked std::thread::id m_OwningThreadID; #endif // _DEBUG - + std::recursive_mutex m_Mutex; } ALIGN_8; @@ -46,12 +46,12 @@ class cCSLock // In Windows, it is an error to call cCriticalSection::Unlock() multiple times if the lock is not held, // therefore we need to check this value whether we are locked or not. bool m_IsLocked; - + public: cCSLock(cCriticalSection * a_CS); cCSLock(cCriticalSection & a_CS); ~cCSLock(); - + // Temporarily unlock or re-lock: void Lock(void); void Unlock(void); @@ -71,7 +71,7 @@ class cCSUnlock public: cCSUnlock(cCSLock & a_Lock); ~cCSUnlock(); - + private: DISALLOW_COPY_AND_ASSIGN(cCSUnlock); } ; |