From: Mathieu Desnoyers Date: Sat, 26 Sep 2009 22:26:50 +0000 (-0400) Subject: Don't mark reader thread as being waited for if non-contended X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=47f9040b495f7241143cd5d85b66eb10ef34b7f9;p=userspace-rcu.git Don't mark reader thread as being waited for if non-contended Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu.c b/urcu.c index a9ebf59..f74304c 100644 --- a/urcu.c +++ b/urcu.c @@ -220,6 +220,10 @@ void wait_for_quiescent_state(void) for (index = registry; index < registry + num_readers; index++) { int wait_loops = 0; + if (likely(!rcu_old_gp_ongoing( + &index->urcu_reader_status->active_readers))) + continue; + index->urcu_reader_status->gp_waiting = 1; #ifndef HAS_INCOHERENT_CACHES while (rcu_old_gp_ongoing(