summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/lock.h6
-rw-r--r--i386/include/mach/i386/cthreads.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/i386/i386/lock.h b/i386/i386/lock.h
index 2b5c4aa..38a66c8 100644
--- a/i386/i386/lock.h
+++ b/i386/i386/lock.h
@@ -47,7 +47,7 @@
({ register int _old_val_; \
asm volatile("xchgl %0, %2" \
: "=r" (_old_val_) \
- : "0" (new_val), "m" (*(lock)) \
+ : "0" (new_val), "m" (*(lock) : "memory") \
); \
_old_val_; \
})
@@ -81,7 +81,7 @@
btsl %0, %1 \n\
jb 0b" \
: \
- : "r" (bit), "m" (*(volatile int *)(l))); \
+ : "r" (bit), "m" (*(volatile int *)(l)) : "memory"); \
0; \
})
@@ -90,7 +90,7 @@
asm volatile(" lock \n\
btrl %0, %1" \
: \
- : "r" (bit), "m" (*(volatile int *)(l))); \
+ : "r" (bit), "m" (*(volatile int *)(l)) : "memory"); \
0; \
})
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() \