aboutsummaryrefslogtreecommitdiff
path: root/src/threadsafety.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadsafety.h')
-rw-r--r--src/threadsafety.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/threadsafety.h b/src/threadsafety.h
index 61e63dbc7a..d847269dff 100644
--- a/src/threadsafety.h
+++ b/src/threadsafety.h
@@ -31,6 +31,7 @@
#define EXCLUSIVE_LOCKS_REQUIRED(...) __attribute__((exclusive_locks_required(__VA_ARGS__)))
#define SHARED_LOCKS_REQUIRED(...) __attribute__((shared_locks_required(__VA_ARGS__)))
#define NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
+#define ASSERT_EXCLUSIVE_LOCK(...) __attribute((assert_exclusive_lock(__VA_ARGS__)))
#else
#define LOCKABLE
#define SCOPED_LOCKABLE
@@ -50,6 +51,7 @@
#define EXCLUSIVE_LOCKS_REQUIRED(...)
#define SHARED_LOCKS_REQUIRED(...)
#define NO_THREAD_SAFETY_ANALYSIS
+#define ASSERT_EXCLUSIVE_LOCK(...)
#endif // __GNUC__
#endif // BITCOIN_THREADSAFETY_H