summaryrefslogtreecommitdiff
path: root/sysdeps/i386/bits/spin-lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/bits/spin-lock.h')
-rw-r--r--sysdeps/i386/bits/spin-lock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/i386/bits/spin-lock.h b/sysdeps/i386/bits/spin-lock.h
index 30b0c64b..a3066979 100644
--- a/sysdeps/i386/bits/spin-lock.h
+++ b/sysdeps/i386/bits/spin-lock.h
@@ -70,7 +70,7 @@ __pthread_spin_trylock (__pthread_spinlock_t *__lock)
{
int __locked;
__asm__ __volatile ("xchgl %0, %1"
- : "=&r" (__locked), "=m" (*__lock) : "0" (1));
+ : "=&r" (__locked), "=m" (*__lock) : "0" (1) : "memory");
return __locked ? __EBUSY : 0;
}
@@ -92,7 +92,7 @@ __pthread_spin_unlock (__pthread_spinlock_t *__lock)
{
int __unlocked;
__asm__ __volatile ("xchgl %0, %1"
- : "=&r" (__unlocked), "=m" (*__lock) : "0" (0));
+ : "=&r" (__unlocked), "=m" (*__lock) : "0" (0) : "memory");
return 0;
}