mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 05:39:38 +02:00
Pass chain locked variables where needed
This commit does not change behavior. All it does is pass new function
parameters.
It is easiest to review this change with:
git log -p -n1 -U0 --word-diff-regex=.
This commit is contained in:
@@ -54,4 +54,15 @@
|
||||
#define ASSERT_EXCLUSIVE_LOCK(...)
|
||||
#endif // __GNUC__
|
||||
|
||||
// Utility class for indicating to compiler thread analysis that a mutex is
|
||||
// locked (when it couldn't be determined otherwise).
|
||||
struct SCOPED_LOCKABLE LockAnnotation
|
||||
{
|
||||
template <typename Mutex>
|
||||
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
|
||||
{
|
||||
}
|
||||
~LockAnnotation() UNLOCK_FUNCTION() {}
|
||||
};
|
||||
|
||||
#endif // BITCOIN_THREADSAFETY_H
|
||||
|
||||
Reference in New Issue
Block a user