mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Add unit test for DEBUG_LOCKORDER code
This commit is contained in:
@@ -77,6 +77,13 @@ std::string LocksHeld();
|
||||
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) ASSERT_EXCLUSIVE_LOCK(cs);
|
||||
void AssertLockNotHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs);
|
||||
void DeleteLock(void* cs);
|
||||
|
||||
/**
|
||||
* Call abort() if a potential lock order deadlock bug is detected, instead of
|
||||
* just logging information and throwing a logic_error. Defaults to true, and
|
||||
* set to false in DEBUG_LOCKORDER unit tests.
|
||||
*/
|
||||
extern bool g_debug_lockorder_abort;
|
||||
#else
|
||||
void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
|
||||
void static inline LeaveCritical() {}
|
||||
|
||||
Reference in New Issue
Block a user