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=b648196904a64362f7b24c85effd23150a30ce1c;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(