RCU dereference check if within read-side critical section
[userspace-rcu.git] / urcu / static / urcu.h
index b5fc09f93553578ae32f660b9c65a49a9ea3517f..0fe32e88cea48241a463054f4e4411aee0428e3a 100644 (file)
@@ -42,6 +42,7 @@
 #include <urcu/futex.h>
 #include <urcu/tls-compat.h>
 #include <urcu/rand-compat.h>
+#include <urcu/urcu-checker.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -219,6 +220,7 @@ static inline void _rcu_read_lock(void)
 {
        unsigned long tmp;
 
+       rcu_read_lock_debug();
        cmm_barrier();
        tmp = URCU_TLS(rcu_reader).ctr;
        _rcu_read_lock_update(tmp);
@@ -255,6 +257,7 @@ static inline void _rcu_read_unlock(void)
        tmp = URCU_TLS(rcu_reader).ctr;
        _rcu_read_unlock_update_and_wakeup(tmp);
        cmm_barrier();  /* Ensure the compiler does not reorder us with mutex */
+       rcu_read_unlock_debug();
 }
 
 /*
This page took 0.022275 seconds and 4 git commands to generate.