[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Fix xchg macro.



# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1176391625 18000
# Node ID ebc4fb63113f480f804cdd95819be252172db12a
# Parent  bfe2136c163ac44e0f10d1de404b224ce67b5d78
[XEN][POWERPC] Fix xchg macro.
Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/include/asm-powerpc/system.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r bfe2136c163a -r ebc4fb63113f xen/include/asm-powerpc/system.h
--- a/xen/include/asm-powerpc/system.h  Wed Apr 11 14:34:08 2007 +0100
+++ b/xen/include/asm-powerpc/system.h  Thu Apr 12 10:27:05 2007 -0500
@@ -28,7 +28,11 @@
 #include <asm/processor.h>
 #include <asm/msr.h>
 
-#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned 
long)(v),(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x)                                                           \
+({                                                                            \
+       __typeof__(*(ptr)) _x_ = (x);                                          \
+       (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); 
\
+})
 
 static __inline__ unsigned long
 __xchg_u32(volatile int *m, unsigned long val)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.