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/xtensa | |
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/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/rwsem.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/xtensa/include/asm/rwsem.h b/arch/xtensa/include/asm/rwsem.h index 1be2102c648e..585cab9b0bdf 100644 --- a/arch/xtensa/include/asm/rwsem.h +++ b/arch/xtensa/include/asm/rwsem.h | |||
@@ -16,20 +16,13 @@ | |||
16 | #ifndef _LINUX_RWSEM_H | 16 | #ifndef _LINUX_RWSEM_H |
17 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." | 17 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." |
18 | #endif | 18 | #endif |
19 | /* | 19 | |
20 | * the semaphore definition | ||
21 | */ | ||
22 | struct rw_semaphore { | ||
23 | signed long count; | ||
24 | #define RWSEM_UNLOCKED_VALUE 0x00000000 | 20 | #define RWSEM_UNLOCKED_VALUE 0x00000000 |
25 | #define RWSEM_ACTIVE_BIAS 0x00000001 | 21 | #define RWSEM_ACTIVE_BIAS 0x00000001 |
26 | #define RWSEM_ACTIVE_MASK 0x0000ffff | 22 | #define RWSEM_ACTIVE_MASK 0x0000ffff |
27 | #define RWSEM_WAITING_BIAS (-0x00010000) | 23 | #define RWSEM_WAITING_BIAS (-0x00010000) |
28 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 24 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
29 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 25 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
30 | spinlock_t wait_lock; | ||
31 | struct list_head wait_list; | ||
32 | }; | ||
33 | 26 | ||
34 | #define __RWSEM_INITIALIZER(name) \ | 27 | #define __RWSEM_INITIALIZER(name) \ |
35 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ | 28 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |