patch-2.4.0-test9 linux/include/asm-i386/rwlock.h
Next file: linux/include/asm-i386/semaphore.h
Previous file: linux/include/asm-i386/resource.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Fri Sep 22 14:07:43 2000
- Orig file:
v2.4.0-test8/linux/include/asm-i386/rwlock.h
- Orig date:
Sat Nov 27 16:04:04 1999
diff -u --recursive --new-file v2.4.0-test8/linux/include/asm-i386/rwlock.h linux/include/asm-i386/rwlock.h
@@ -17,9 +17,6 @@
#ifndef _ASM_I386_RWLOCK_H
#define _ASM_I386_RWLOCK_H
-typedef struct { unsigned long a[100]; } __dummy_lock_t;
-#define __dummy_lock(lock) (*(__dummy_lock_t *)(lock))
-
#define RW_LOCK_BIAS 0x01000000
#define RW_LOCK_BIAS_STR "0x01000000"
@@ -44,7 +41,7 @@
"popl %%eax\n\t" \
"jmp 1b\n" \
".previous" \
- :"=m" (__dummy_lock(rw)))
+ :"=m" (*(volatile int *)rw) : : "memory")
#define __build_read_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
@@ -74,7 +71,7 @@
"popl %%eax\n\t" \
"jmp 1b\n" \
".previous" \
- :"=m" (__dummy_lock(rw)))
+ :"=m" (*(volatile int *)rw) : : "memory")
#define __build_write_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)