From 47f9040b495f7241143cd5d85b66eb10ef34b7f9 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 26 Sep 2009 18:26:50 -0400 Subject: [PATCH] Don't mark reader thread as being waited for if non-contended Signed-off-by: Mathieu Desnoyers --- urcu.c | 4 ++++ 1 file changed, 4 insertions(+) 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( -- 2.34.1