Replace explicit rcu_read_lock/unlock with lttng::urcu::read_lock_guard
[lttng-tools.git] / src / common / macros.hpp
index dab6e6df014b7ee1c6976e171423c187f7ff1c91..ff0d5bb9365fb11cf6e1f9506aeebd80b2e20d80 100644 (file)
@@ -251,7 +251,8 @@ void *memmove(DestinationType *d, const SourceType *s, size_t n) = delete;
 #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())
+#define ASSERT_RCU_READ_LOCKED() LTTNG_ASSERT(rcu_read_ongoing())
+#define ASSERT_RCU_READ_UNLOCKED() 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.023567 seconds and 4 git commands to generate.