From f858d07ab45c9a50e458cdcc9d5b26cbaa765de3 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 5 Feb 2009 21:14:20 -0500 Subject: [PATCH] fix wait_for_quiescent_state --- urcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urcu.c b/urcu.c index ee79d1e..232a57b 100644 --- a/urcu.c +++ b/urcu.c @@ -101,7 +101,7 @@ void wait_for_quiescent_state(int parity) /* * BUSY-LOOP. */ - while (*index->urcu_active_readers != 0) + while (index->urcu_active_readers[parity] != 0) barrier(); } /* @@ -134,8 +134,8 @@ void *urcu_publish_content(void **ptr, void *new) */ oldptr = *ptr; *ptr = new; - wmb(); /* Write ptr before changing the qparity */ /* All threads should read qparity before ptr */ + /* Write ptr before changing the qparity */ force_mb_all_threads(); prev_parity = switch_next_urcu_qparity(); -- 2.34.1