@@ -53,8 +53,9 @@ void LeaveCritical();
53
53
void CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line);
54
54
std::string LocksHeld ();
55
55
template <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);
58
59
void DeleteLock (void * cs);
59
60
bool LockStackEmpty ();
60
61
@@ -69,8 +70,9 @@ inline void EnterCritical(const char* pszName, const char* pszFile, int nLine, v
69
70
inline void LeaveCritical () {}
70
71
inline void CheckLastCritical (void * cs, std::string& lockname, const char * guardname, const char * file, int line) {}
71
72
template <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) {}
74
76
inline void DeleteLock (void * cs) {}
75
77
inline bool LockStackEmpty () { return true ; }
76
78
#endif
0 commit comments