diff options
| author | Jesse Cohen <[email protected]> | 2018-06-08 14:06:58 -0400 |
|---|---|---|
| committer | Jesse Cohen <[email protected]> | 2018-07-25 10:31:27 -0400 |
| commit | f393a533bebc088985f94c725b9af881500ba998 (patch) | |
| tree | 106f7fc744b1f3a8c4dfa0b55e9cc88ebdbf0fec /src/sync.h | |
| parent | Merge #13714: contrib: Add lxc network setup for Bionic host (diff) | |
| download | discoin-f393a533bebc088985f94c725b9af881500ba998.tar.xz discoin-f393a533bebc088985f94c725b9af881500ba998.zip | |
Annotate AssertLockHeld() with ASSERT_CAPABILITY() for thread safety analysis
Diffstat (limited to 'src/sync.h')
| -rw-r--r-- | src/sync.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync.h b/src/sync.h index 3c451af37..882ad5dc4 100644 --- a/src/sync.h +++ b/src/sync.h @@ -74,13 +74,13 @@ public: void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false); void LeaveCritical(); std::string LocksHeld(); -void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs); +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); #else void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {} void static inline LeaveCritical() {} -void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {} +void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) ASSERT_EXCLUSIVE_LOCK(cs) {} void static inline AssertLockNotHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {} void static inline DeleteLock(void* cs) {} #endif |