diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-08-03 13:00:44 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:27:18 +0200 |
commit | 511300311b1a57ad7279f91ab11d1bcf6fe202da (patch) | |
tree | 4d0423f6b860a88576e366fcef7b26e6dab92288 /i386/include/mach | |
parent | a2e1ed839ebd352c3114193c24a61ef2ef72ddff (diff) |
2008-08-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386/i386/lock.h (_simple_lock_xchg_, bit_lock, bit_unlock): Add
memory clobbers.
* i386/include/mach/i386/cthreads.h (spin_unlock, spin_try_lock): Add
memory clobbers.
Diffstat (limited to 'i386/include/mach')
-rw-r--r-- | i386/include/mach/i386/cthreads.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i386/include/mach/i386/cthreads.h b/i386/include/mach/i386/cthreads.h index e10cda3..f9755b4 100644 --- a/i386/include/mach/i386/cthreads.h +++ b/i386/include/mach/i386/cthreads.h @@ -37,14 +37,14 @@ typedef volatile int spin_lock_t; ({ register int _u__ ; \ __asm__ volatile("xorl %0, %0; \n\ xchgl %0, %1" \ - : "=&r" (_u__), "=m" (*(p)) ); \ + : "=&r" (_u__), "=m" (*(p)) : "memory" ); \ 0; }) #define spin_try_lock(p)\ (!({ boolean_t _r__; \ __asm__ volatile("movl $1, %0; \n\ xchgl %0, %1" \ - : "=&r" (_r__), "=m" (*(p)) ); \ + : "=&r" (_r__), "=m" (*(p)) : "memory" ); \ _r__; })) #define cthread_sp() \ |