|
|
@ -88,12 +88,13 @@ typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection; |
|
|
|
void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false); |
|
|
|
void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false); |
|
|
|
void LeaveCritical(); |
|
|
|
void LeaveCritical(); |
|
|
|
std::string LocksHeld(); |
|
|
|
std::string LocksHeld(); |
|
|
|
void AssertLockHeld(std::string strName); |
|
|
|
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void *cs); |
|
|
|
#else |
|
|
|
#else |
|
|
|
void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {} |
|
|
|
void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {} |
|
|
|
void static inline LeaveCritical() {} |
|
|
|
void static inline LeaveCritical() {} |
|
|
|
void static inline AssertLockHeld(std::string) {} |
|
|
|
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void *cs) {} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs) |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_LOCKCONTENTION |
|
|
|
#ifdef DEBUG_LOCKCONTENTION |
|
|
|
void PrintLockContention(const char* pszName, const char* pszFile, int nLine); |
|
|
|
void PrintLockContention(const char* pszName, const char* pszFile, int nLine); |
|
|
|