From: Paolo Bonzini Date: Mon, 1 Mar 2010 19:06:01 +0000 (-0500) Subject: avoid multiple evaluation of STORE_SHARED argument X-Git-Tag: v0.4.2~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f152776dbd7d8cf072160d4d0229e1c3e4ea6f1c;p=userspace-rcu.git avoid multiple evaluation of STORE_SHARED argument Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/system.h b/urcu/system.h index e36a13b..0c3152f 100644 --- a/urcu/system.h +++ b/urcu/system.h @@ -46,9 +46,9 @@ */ #define STORE_SHARED(x, v) \ ({ \ - _STORE_SHARED(x, v); \ + typeof(x) _v = _STORE_SHARED(x, v); \ smp_wmc(); \ - (v); \ + _v; \ }) #endif /* _URCU_SYSTEM_H */