From: Mathieu Desnoyers Date: Fri, 6 Feb 2009 02:14:20 +0000 (-0500) Subject: fix wait_for_quiescent_state X-Git-Tag: v0.1~326 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f858d07ab45c9a50e458cdcc9d5b26cbaa765de3;p=urcu.git fix wait_for_quiescent_state --- 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();