diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:32 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:32 -0400 |
commit | fb2e28485679418e459583605f9b19807a72ceca (patch) | |
tree | c3e6bf7f75fb9c6ed286ef09eebf281388761cfe /include/asm-i386/rwlock.h | |
parent | 8b059d2373c16b6d32787a49daf8ccf72dc61b71 (diff) |
[PATCH] i386: Clean up spin/rwlocks
- Inline spinlock strings into their inline functions
- Convert macros to typesafe inlines
- Replace some leftover __asm__ __volatile__s with asm volatile
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-i386/rwlock.h')
-rw-r--r-- | include/asm-i386/rwlock.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h index f40ccbd8cb7f..c3e5db32fa48 100644 --- a/include/asm-i386/rwlock.h +++ b/include/asm-i386/rwlock.h | |||
@@ -20,18 +20,6 @@ | |||
20 | #define RW_LOCK_BIAS 0x01000000 | 20 | #define RW_LOCK_BIAS 0x01000000 |
21 | #define RW_LOCK_BIAS_STR "0x01000000" | 21 | #define RW_LOCK_BIAS_STR "0x01000000" |
22 | 22 | ||
23 | #define __build_read_lock(rw, helper) \ | 23 | /* Code is in asm-i386/spinlock.h */ |
24 | asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \ | ||
25 | "jns 1f\n" \ | ||
26 | "call " helper "\n\t" \ | ||
27 | "1:\n" \ | ||
28 | ::"a" (rw) : "memory") | ||
29 | |||
30 | #define __build_write_lock(rw, helper) \ | ||
31 | asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ | ||
32 | "jz 1f\n" \ | ||
33 | "call " helper "\n\t" \ | ||
34 | "1:\n" \ | ||
35 | ::"a" (rw) : "memory") | ||
36 | 24 | ||
37 | #endif | 25 | #endif |