[ltt-dev] [PATCH 11/12] avoid multiple evaluation of STORE_SHARED argument

Paolo Bonzini pbonzini at redhat.com
Fri Feb 19 14:22:53 EST 2010


Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
 urcu/system.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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 */
-- 
1.6.6






More information about the lttng-dev mailing list