aboutsummaryrefslogtreecommitdiff
path: root/src/sync.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-11-29 17:25:30 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-11-29 17:46:19 +1000
commitc649637b6ccb270bd0160163e6e92c1456774286 (patch)
tree9aaf103937dfe8cd11e39be3845cfc8188125000 /src/sync.h
parent207cfbfbf1ea21bd6cf8bb905b0908de339ef518 (diff)
mutex debugging routines: LocksHeld() and AssertLockHeld()
Diffstat (limited to 'src/sync.h')
-rw-r--r--src/sync.h3
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