mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Add means to handle negative capabilities in thread safety annotations
This commit is contained in:
@@ -103,6 +103,12 @@ public:
|
||||
}
|
||||
|
||||
using UniqueLock = std::unique_lock<PARENT>;
|
||||
#ifdef __clang__
|
||||
//! For negative capabilities in the Clang Thread Safety Analysis.
|
||||
//! A negative requirement uses the EXCLUSIVE_LOCKS_REQUIRED attribute, in conjunction
|
||||
//! with the ! operator, to indicate that a mutex should not be held.
|
||||
const AnnotatedMixin& operator!() const { return *this; }
|
||||
#endif // __clang__
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user