@@ -56,6 +56,7 @@ template <typename MutexType>
5656void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) ASSERT_EXCLUSIVE_LOCK(cs);
5757void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs);
5858void DeleteLock (void * cs);
59+ bool LockStackEmpty ();
5960
6061/* *
6162 * Call abort() if a potential lock order deadlock bug is detected, instead of
@@ -64,13 +65,14 @@ void DeleteLock(void* cs);
6465 */
6566extern bool g_debug_lockorder_abort;
6667#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) {}
7071template <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 ; }
7476#endif
7577#define AssertLockHeld (cs ) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
7678#define AssertLockNotHeld (cs ) AssertLockNotHeldInternal(#cs, __FILE__, __LINE__, &cs)
0 commit comments