Move LockAnnotation from threadsafety.h (imported code) to sync.h (our code)
This commit is contained in:
parent
a822a0e4f6
commit
cc2588579c
2 changed files with 11 additions and 11 deletions
11
src/sync.h
11
src/sync.h
|
@ -304,4 +304,15 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// 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_SYNC_H
|
||||
|
|
|
@ -54,15 +54,4 @@
|
|||
#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
|
||||
|
|
Loading…
Reference in a new issue