diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-11-29 17:25:30 +1000 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-11-29 17:46:19 +1000 |
commit | c649637b6ccb270bd0160163e6e92c1456774286 (patch) | |
tree | 9aaf103937dfe8cd11e39be3845cfc8188125000 /src/sync.h | |
parent | 207cfbfbf1ea21bd6cf8bb905b0908de339ef518 (diff) |
mutex debugging routines: LocksHeld() and AssertLockHeld()
Diffstat (limited to 'src/sync.h')
-rw-r--r-- | src/sync.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sync.h b/src/sync.h index 39f2cb5155..c50abf81b6 100644 --- a/src/sync.h +++ b/src/sync.h @@ -87,9 +87,12 @@ typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection; #ifdef DEBUG_LOCKORDER 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); #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) {} #endif #ifdef DEBUG_LOCKCONTENTION |