diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/bits/memory.h | 2 | ||||
-rw-r--r-- | sysdeps/i386/bits/spin-lock.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/i386/bits/memory.h b/sysdeps/i386/bits/memory.h index e47a8e2d..932c4086 100644 --- a/sysdeps/i386/bits/memory.h +++ b/sysdeps/i386/bits/memory.h @@ -28,7 +28,7 @@ __memory_barrier (void) /* Any lock'ed instruction will do. We just do a simple increment. */ - __asm__ __volatile ("lock; incl %0" : "=m" (i) : "m" (i)); + __asm__ __volatile ("lock; incl %0" : "=m" (i) : "m" (i) : "memory"); } /* Prevent read reordering across this function. */ 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; } |