Enforce documented RCU preconditions with assertions
[lttng-tools.git] / src / common / macros.h
index 1c131db780e5eb2980fcefc875608040456e1f1b..43a4d692b80fbad0a5a42f03f2ceffc3450c63a1 100644 (file)
@@ -74,6 +74,7 @@ void *zmalloc(size_t len)
 #define member_sizeof(type, field)     sizeof(((type *) 0)->field)
 
 #define ASSERT_LOCKED(lock) LTTNG_ASSERT(pthread_mutex_trylock(&lock))
+#define ASSERT_RCU_READ_LOCKED(lock) LTTNG_ASSERT(rcu_read_ongoing())
 
 /* Attribute suitable to tag functions as having printf()-like arguments. */
 #define ATTR_FORMAT_PRINTF(_string_index, _first_to_check) \
This page took 0.023077 seconds and 4 git commands to generate.