@@ -53,8 +53,9 @@ void LeaveCritical();
5353void CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line);
5454std::string LocksHeld ();
5555template <typename MutexType>
56- void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs);
57- void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs);
56+ void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs);
57+ template <typename MutexType>
58+ void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(!cs);
5859void DeleteLock (void * cs);
5960bool LockStackEmpty ();
6061
@@ -69,8 +70,9 @@ inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, v
6970inline void LeaveCritical () {}
7071inline void CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line) {}
7172template <typename MutexType>
72- inline void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) {}
73- inline void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, void * cs) {}
73+ inline void AssertLockHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs) {}
74+ template <typename MutexType>
75+ void AssertLockNotHeldInternal (const char * pszName, const char * pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(!cs) {}
7476inline void DeleteLock (void * cs) {}
7577inline bool LockStackEmpty () { return true ; }
7678#endif
0 commit comments