From 511300311b1a57ad7279f91ab11d1bcf6fe202da Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 3 Aug 2008 13:00:44 +0000 Subject: 2008-08-03 Samuel Thibault * 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. --- i386/include/mach/i386/cthreads.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'i386/include/mach') 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() \ -- cgit v1.2.3