Detect unbalanced lock/unlock
[userspace-rcu.git] / urcu / static / urcu-qsbr.h
index 8f2ca32a2f111c4b1469c010c5f1fcb4669039a5..4092d6bc4f67ffe34c5b190b3f2923504dc25039 100644 (file)
@@ -43,6 +43,7 @@
 #include <urcu/list.h>
 #include <urcu/futex.h>
 #include <urcu/tls-compat.h>
+#include <urcu/urcu-checker.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -130,8 +131,10 @@ static inline enum rcu_state rcu_reader_state(unsigned long *ctr)
  * function meets the 10-line criterion for LGPL, allowing this function
  * to be invoked directly from non-LGPL code.
  */
-static inline void _rcu_read_lock(void)
+static inline __attribute__((always_inline))
+void _rcu_read_lock(void)
 {
+       rcu_read_lock_debug();
        rcu_assert(URCU_TLS(rcu_reader).ctr);
 }
 
@@ -142,8 +145,10 @@ static inline void _rcu_read_lock(void)
  * function meets the 10-line criterion for LGPL, allowing this function
  * to be invoked directly from non-LGPL code.
  */
-static inline void _rcu_read_unlock(void)
+static inline __attribute__((always_inline))
+void _rcu_read_unlock(void)
 {
+       rcu_read_unlock_debug();
 }
 
 /*
This page took 0.023128 seconds and 4 git commands to generate.