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:
Russell Yanofsky
2017-07-31 15:30:21 -04:00
parent 79d579f4e1
commit 081accb875
8 changed files with 175 additions and 152 deletions

View File

@@ -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