diff options
| author | Gavin Andresen <[email protected]> | 2013-11-29 17:25:30 +1000 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-11-29 17:46:19 +1000 |
| commit | c649637b6ccb270bd0160163e6e92c1456774286 (patch) | |
| tree | 9aaf103937dfe8cd11e39be3845cfc8188125000 /src/sync.h | |
| parent | Merge pull request #3295 (diff) | |
| download | discoin-c649637b6ccb270bd0160163e6e92c1456774286.tar.xz discoin-c649637b6ccb270bd0160163e6e92c1456774286.zip | |
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 39f2cb515..c50abf81b 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 |