Changeset View
Changeset View
Standalone View
Standalone View
src/threadsafety.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
#define LOCK_RETURNED(x) | #define LOCK_RETURNED(x) | ||||
#define LOCKS_EXCLUDED(...) | #define LOCKS_EXCLUDED(...) | ||||
#define EXCLUSIVE_LOCKS_REQUIRED(...) | #define EXCLUSIVE_LOCKS_REQUIRED(...) | ||||
#define SHARED_LOCKS_REQUIRED(...) | #define SHARED_LOCKS_REQUIRED(...) | ||||
#define NO_THREAD_SAFETY_ANALYSIS | #define NO_THREAD_SAFETY_ANALYSIS | ||||
#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 |