From mboxrd@z Thu Jan 1 00:00:00 1970 From: pbonzini@redhat.com (Paolo Bonzini) Date: Mon, 15 Feb 2010 20:04:44 +0100 Subject: [ltt-dev] [PATCH 11/12] avoid multiple evaluation of STORE_SHARED argument In-Reply-To: <1266260686-17588-1-git-send-email-pbonzini@redhat.com> References: <1266260686-17588-1-git-send-email-pbonzini@redhat.com> Message-ID: <1266260686-17588-12-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- 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