Add rcu_read_ongoing() API to each urcu flavor
[urcu.git] / urcu-qsbr.c
index 3c2c65da4aa14e5b6cbf4a7c8b259ab6d86adf3c..786a80d6b16b1936dc62b71b43db18850854dd41 100644 (file)
@@ -208,7 +208,7 @@ void synchronize_rcu(void)
        DEFINE_URCU_WAIT_NODE(wait, URCU_WAIT_WAITING);
        struct urcu_waiters waiters;
 
-       was_online = URCU_TLS(rcu_reader).ctr;
+       was_online = rcu_read_ongoing();
 
        /* All threads should read qparity before accessing data structure
         * where new ptr points to.  In the "then" case, rcu_thread_offline
@@ -317,7 +317,7 @@ void synchronize_rcu(void)
        DEFINE_URCU_WAIT_NODE(wait, URCU_WAIT_WAITING);
        struct urcu_waiters waiters;
 
-       was_online = URCU_TLS(rcu_reader).ctr;
+       was_online = rcu_read_ongoing();
 
        /*
         * Mark the writer thread offline to make sure we don't wait for
@@ -405,6 +405,11 @@ void rcu_read_unlock(void)
        _rcu_read_unlock();
 }
 
+int rcu_read_ongoing(void)
+{
+       return _rcu_read_ongoing();
+}
+
 void rcu_quiescent_state(void)
 {
        _rcu_quiescent_state();
This page took 0.02324 seconds and 4 git commands to generate.