|
|
|
@ -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 LeaveCritical();
|
|
|
|
|
std::string LocksHeld();
|
|
|
|
|
void AssertLockHeld(std::string strName);
|
|
|
|
|
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void *cs);
|
|
|
|
|
#else
|
|
|
|
|
void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
|
|
|
|
|
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
|
|
|
|
|
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_LOCKCONTENTION
|
|
|
|
|
void PrintLockContention(const char* pszName, const char* pszFile, int nLine);
|
|
|
|
|