RPA Toolkit
dev
authormstoilov <mstoilov@b0bb84a5-424d-4f98-af44-3ef3f117eb03>
Sat, 24 Jul 2010 08:14:56 +0000 (01:14 -0700)
committermstoilov <mstoilov@b0bb84a5-424d-4f98-af44-3ef3f117eb03>
Sat, 24 Jul 2010 08:14:56 +0000 (01:14 -0700)
git-svn-id: svn+ssh://svn.crossrain.com/svn/rpase/trunk/rtk@144 b0bb84a5-424d-4f98-af44-3ef3f117eb03

arch/linux/x86_64/rtypes.h

index 8a3e8ad..f3aa8e9 100644 (file)
@@ -46,7 +46,7 @@ typedef unsigned int ratomic;
                        : "r" (newval), "m" (*ptr), "0" (oldval)); } while (0)
 
 #define R_ATOMIC_XCHG(ptr, val) \
-               do { __asm__ __volatile__("xchgl %0,%1" \
+               do { __asm__ __volatile__("lock; xchgl %0,%1" \
                        :"=r" ((ruint32) val) \
                        :"m" (*(volatile ruint32 *)ptr), "0" (val) \
                        :"memory"); } while (0)