X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-qsbr.c;h=786a80d6b16b1936dc62b71b43db18850854dd41;hp=3c2c65da4aa14e5b6cbf4a7c8b259ab6d86adf3c;hb=882f335739b978d1c55be2faeed077f315afe5d7;hpb=bf6822a6b57e21a18a01731277355ab2e4eb23f3 diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 3c2c65d..786a80d 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -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();