From ad7de003b45b3a7339b90208c321517c2dcbdc3e Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 9 May 2009 10:48:38 -0400 Subject: [PATCH] Add ACCESS_ONCE to _STORE_SHARED We assume that the compiler does not reorder _STORE_SHARED across each other and wrt _READ_SHARED. We therefore need to mark this access as volatile. The compiler cannot reorder volatile accesses. Signed-off-by: Mathieu Desnoyers --- urcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urcu.h b/urcu.h index 819555e..b43b280 100644 --- a/urcu.h +++ b/urcu.h @@ -87,7 +87,7 @@ */ #define _STORE_SHARED(x, v) \ do { \ - (x) = (v); \ + ACCESS_ONCE(x) = (v); \ } while (0) /* -- 2.34.1