about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/i386/pt-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/i386/pt-machine.h')
-rw-r--r--linuxthreads/sysdeps/i386/pt-machine.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h
index 6723c80bda..7ed90b7553 100644
--- a/linuxthreads/sysdeps/i386/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/pt-machine.h
@@ -26,9 +26,11 @@ testandset (int *spinlock)
 {
   int ret;
 
-  __asm__ __volatile__("xchgl %0, %1"
-	: "=r"(ret), "=m"(*spinlock)
-	: "0"(1), "m"(*spinlock));
+  __asm__ __volatile__(
+       "xchgl %0, %1"
+       : "=r"(ret), "=m"(*spinlock)
+       : "0"(1), "m"(*spinlock)
+       : "memory");
 
   return ret;
 }