From: Mathieu Desnoyers Date: Tue, 2 Mar 2010 16:41:01 +0000 (-0500) Subject: compiler.h: add () in ACCESS_ONCE() X-Git-Tag: v0.4.2~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=56b14eae63673af90dd92e9495ee1d6905591f1f;p=userspace-rcu.git compiler.h: add () in ACCESS_ONCE() Protect x in ACCESS_ONCE macro. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/compiler.h b/urcu/compiler.h index 5b7bb30..ce19c74 100644 --- a/urcu/compiler.h +++ b/urcu/compiler.h @@ -37,7 +37,7 @@ * use is to mediate communication between process-level code and irq/NMI * handlers, all running on the same CPU. */ -#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&x) +#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) #ifndef max #define max(a,b) ((a)>(b)?(a):(b))