@@ -56,6 +56,7 @@ template <typename MutexType>
56
56
void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) ASSERT_EXCLUSIVE_LOCK(cs);
57
57
void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs);
58
58
void DeleteLock (void * cs);
59
+ bool LockStackEmpty ();
59
60
60
61
/* *
61
62
* Call abort() if a potential lock order deadlock bug is detected, instead of
@@ -64,13 +65,14 @@ void DeleteLock(void* cs);
64
65
*/
65
66
extern bool g_debug_lockorder_abort;
66
67
#else
67
- void static inline EnterCritical (const char * pszName, const char * pszFile, int nLine, void * cs, bool fTry = false ) {}
68
- void static inline LeaveCritical () {}
69
- void static inline CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line) {}
68
+ inline void EnterCritical (const char * pszName, const char * pszFile, int nLine, void * cs, bool fTry = false ) {}
69
+ inline void LeaveCritical () {}
70
+ inline void CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line) {}
70
71
template <typename MutexType>
71
- void static inline AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) ASSERT_EXCLUSIVE_LOCK(cs) {}
72
- void static inline AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs) {}
73
- void static inline DeleteLock (void * cs) {}
72
+ inline void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) ASSERT_EXCLUSIVE_LOCK(cs) {}
73
+ inline void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs) {}
74
+ inline void DeleteLock (void * cs) {}
75
+ inline bool LockStackEmpty () { return true ; }
74
76
#endif
75
77
#define AssertLockHeld (cs ) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
76
78
#define AssertLockNotHeld (cs ) AssertLockNotHeldInternal(#cs, __FILE__, __LINE__, &cs)
0 commit comments