summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/spinlock.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
commit16b5d462f73eb29d1f67fa01cc1ea66afdc72569 (patch)
tree5407bd573f4840e473ea27cbe61e5c7a07131fcd /include/asm-sparc64/spinlock.h
parentce8a076e11e7e5ee36007f9a3eee5bb3744cb8f6 (diff)
Merge with Linux 2.3.99-pre2.
Diffstat (limited to 'include/asm-sparc64/spinlock.h')
-rw-r--r--include/asm-sparc64/spinlock.h44
1 files changed, 9 insertions, 35 deletions
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
index c4e571564..ea34fbefe 100644
--- a/include/asm-sparc64/spinlock.h
+++ b/include/asm-sparc64/spinlock.h
@@ -110,41 +110,15 @@ extern int _spin_trylock (spinlock_t *lock);
typedef unsigned int rwlock_t;
#define RW_LOCK_UNLOCKED 0
-#define read_lock(__rw_lck) \
-do { register rwlock_t *__X asm("g1"); \
- __asm__ __volatile__("sethi %%hi(__read_lock), %%g3\n\t" \
- "jmpl %%g3 + %%lo(__read_lock), %%g3\n\t" \
- " nop\n1:" \
- : : "r" (__X = (__rw_lck)) \
- : "g3", "g5", "g7", "cc", "memory"); \
-} while(0)
-
-#define read_unlock(__rw_lck) \
-do { register rwlock_t *__X asm("g1"); \
- __asm__ __volatile__("sethi %%hi(__read_unlock), %%g3\n\t" \
- "jmpl %%g3 + %%lo(__read_unlock), %%g3\n\t" \
- " nop\n1:" \
- : : "r" (__X = (__rw_lck)) \
- : "g3", "g5", "g7", "cc", "memory"); \
-} while(0)
-
-#define write_lock(__rw_lck) \
-do { register rwlock_t *__X asm("g1"); \
- __asm__ __volatile__("sethi %%hi(__write_lock), %%g3\n\t" \
- "jmpl %%g3 + %%lo(__write_lock), %%g3\n\t" \
- " nop\n1:" \
- : : "r" (__X = (__rw_lck)) \
- : "g2", "g3", "g5", "g7", "cc", "memory"); \
-} while(0)
-
-#define write_unlock(__rw_lck) \
-do { register rwlock_t *__X asm("g1"); \
- __asm__ __volatile__("sethi %%hi(__write_unlock), %%g3\n\t" \
- "jmpl %%g3 + %%lo(__write_unlock), %%g3\n\t" \
- " nop\n1:" \
- : : "r" (__X = (__rw_lck)) \
- : "g2", "g3", "g5", "g7", "cc", "memory"); \
-} while(0)
+extern void __read_lock(rwlock_t *);
+extern void __read_unlock(rwlock_t *);
+extern void __write_lock(rwlock_t *);
+extern void __write_unlock(rwlock_t *);
+
+#define read_lock(p) __read_lock(p)
+#define read_unlock(p) __read_unlock(p)
+#define write_lock(p) __write_lock(p)
+#define write_unlock(p) __write_unlock(p)
#else /* !(SPIN_LOCK_DEBUG) */