mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-19 14:40:45 +02:00
Move LockAnnotation from threadsafety.h (imported code) to sync.h (our code)
This commit is contained in:
parent
a822a0e4f6
commit
cc2588579c
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
|
#endif // BITCOIN_SYNC_H
|
||||||
|
@ -54,15 +54,4 @@
|
|||||||
#define ASSERT_EXCLUSIVE_LOCK(...)
|
#define ASSERT_EXCLUSIVE_LOCK(...)
|
||||||
#endif // __GNUC__
|
#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
|
#endif // BITCOIN_THREADSAFETY_H
|
||||||
|
Loading…
Reference in New Issue
Block a user