From c649637b6ccb270bd0160163e6e92c1456774286 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Fri, 29 Nov 2013 17:25:30 +1000 Subject: mutex debugging routines: LocksHeld() and AssertLockHeld() --- src/sync.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sync.h') 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 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 -- cgit v1.2.3