diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-01-26 15:05:56 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-27 06:30:39 -0500 |
commit | 1c8ed640d918290ddc1de5ada02ef6686a733c9f (patch) | |
tree | c824e72ff857b68d992fd7cc24810b472d030cd1 /arch/alpha | |
parent | bde11efbc21ea84c3351464a422b467eaefabb9a (diff) |
rwsem: Move duplicate struct rwsem declaration to linux/rwsem.h
The difference between these declarations is the data type of the
count member and the lack of lockdep in some architectures/
long is equivivalent to signed long and the #ifdef guarded dep_map
member does not hurt anyone.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Matt Turner <mattst88@gmail.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: David Miller <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110126195833.679641914@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/include/asm/rwsem.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/alpha/include/asm/rwsem.h b/arch/alpha/include/asm/rwsem.h index 839a3fa20944..3e5619ead29d 100644 --- a/arch/alpha/include/asm/rwsem.h +++ b/arch/alpha/include/asm/rwsem.h | |||
@@ -19,20 +19,12 @@ extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | |||
19 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *); | 19 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *); |
20 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | 20 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); |
21 | 21 | ||
22 | /* | ||
23 | * the semaphore definition | ||
24 | */ | ||
25 | struct rw_semaphore { | ||
26 | long count; | ||
27 | #define RWSEM_UNLOCKED_VALUE 0x0000000000000000L | 22 | #define RWSEM_UNLOCKED_VALUE 0x0000000000000000L |
28 | #define RWSEM_ACTIVE_BIAS 0x0000000000000001L | 23 | #define RWSEM_ACTIVE_BIAS 0x0000000000000001L |
29 | #define RWSEM_ACTIVE_MASK 0x00000000ffffffffL | 24 | #define RWSEM_ACTIVE_MASK 0x00000000ffffffffL |
30 | #define RWSEM_WAITING_BIAS (-0x0000000100000000L) | 25 | #define RWSEM_WAITING_BIAS (-0x0000000100000000L) |
31 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 26 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
32 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 27 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
33 | spinlock_t wait_lock; | ||
34 | struct list_head wait_list; | ||
35 | }; | ||
36 | 28 | ||
37 | #define __RWSEM_INITIALIZER(name) \ | 29 | #define __RWSEM_INITIALIZER(name) \ |
38 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ | 30 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |