diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 03:24:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 18:27:01 -0400 |
commit | c4e05116a2c4d8187127dbf77ab790aa57a47388 (patch) | |
tree | 58f07aed47ee4d30e9588d5a820c245faa163b09 /include/asm-i386/rwsem.h | |
parent | 8b3db9c542e18b71d4820da4dd9401ee030feacb (diff) |
[PATCH] lockdep: clean up rwsems
Clean up rwsems.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/rwsem.h')
-rw-r--r-- | include/asm-i386/rwsem.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/include/asm-i386/rwsem.h b/include/asm-i386/rwsem.h index be4ab859238e..558804e4a039 100644 --- a/include/asm-i386/rwsem.h +++ b/include/asm-i386/rwsem.h | |||
@@ -61,23 +61,11 @@ struct rw_semaphore { | |||
61 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 61 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
62 | spinlock_t wait_lock; | 62 | spinlock_t wait_lock; |
63 | struct list_head wait_list; | 63 | struct list_head wait_list; |
64 | #if RWSEM_DEBUG | ||
65 | int debug; | ||
66 | #endif | ||
67 | }; | 64 | }; |
68 | 65 | ||
69 | /* | ||
70 | * initialisation | ||
71 | */ | ||
72 | #if RWSEM_DEBUG | ||
73 | #define __RWSEM_DEBUG_INIT , 0 | ||
74 | #else | ||
75 | #define __RWSEM_DEBUG_INIT /* */ | ||
76 | #endif | ||
77 | |||
78 | #define __RWSEM_INITIALIZER(name) \ | 66 | #define __RWSEM_INITIALIZER(name) \ |
79 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ | 67 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ |
80 | __RWSEM_DEBUG_INIT } | 68 | } |
81 | 69 | ||
82 | #define DECLARE_RWSEM(name) \ | 70 | #define DECLARE_RWSEM(name) \ |
83 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 71 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
@@ -87,9 +75,6 @@ static inline void init_rwsem(struct rw_semaphore *sem) | |||
87 | sem->count = RWSEM_UNLOCKED_VALUE; | 75 | sem->count = RWSEM_UNLOCKED_VALUE; |
88 | spin_lock_init(&sem->wait_lock); | 76 | spin_lock_init(&sem->wait_lock); |
89 | INIT_LIST_HEAD(&sem->wait_list); | 77 | INIT_LIST_HEAD(&sem->wait_list); |
90 | #if RWSEM_DEBUG | ||
91 | sem->debug = 0; | ||
92 | #endif | ||
93 | } | 78 | } |
94 | 79 | ||
95 | /* | 80 | /* |