aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/rwsem.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/sparc/include/asm/rwsem.h b/arch/sparc/include/asm/rwsem.h
index 4c16d1de2ab5..79f7c1ca6f91 100644
--- a/arch/sparc/include/asm/rwsem.h
+++ b/arch/sparc/include/asm/rwsem.h
@@ -20,34 +20,11 @@
20#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS 20#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
21#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) 21#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
22 22
23#ifdef CONFIG_DEBUG_LOCK_ALLOC
24# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
25#else
26# define __RWSEM_DEP_MAP_INIT(lockname)
27#endif
28
29#define __RWSEM_INITIALIZER(name) \
30{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
31 LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
32
33#define DECLARE_RWSEM(name) \
34 struct rw_semaphore name = __RWSEM_INITIALIZER(name)
35
36extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); 23extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
37extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); 24extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
38extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); 25extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
39extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); 26extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
40 27
41extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
42 struct lock_class_key *key);
43
44#define init_rwsem(sem) \
45do { \
46 static struct lock_class_key __key; \
47 \
48 __init_rwsem((sem), #sem, &__key); \
49} while (0)
50
51/* 28/*
52 * lock for reading 29 * lock for reading
53 */ 30 */