diff options
Diffstat (limited to 'arch/xtensa/include/asm/rwsem.h')
-rw-r--r-- | arch/xtensa/include/asm/rwsem.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/xtensa/include/asm/rwsem.h b/arch/xtensa/include/asm/rwsem.h index 585cab9b0bdf..2fa420212353 100644 --- a/arch/xtensa/include/asm/rwsem.h +++ b/arch/xtensa/include/asm/rwsem.h | |||
@@ -24,25 +24,11 @@ | |||
24 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 24 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
25 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 25 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
26 | 26 | ||
27 | #define __RWSEM_INITIALIZER(name) \ | ||
28 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ | ||
29 | LIST_HEAD_INIT((name).wait_list) } | ||
30 | |||
31 | #define DECLARE_RWSEM(name) \ | ||
32 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
33 | |||
34 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); | 27 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); |
35 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | 28 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); |
36 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); | 29 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); |
37 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | 30 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); |
38 | 31 | ||
39 | static inline void init_rwsem(struct rw_semaphore *sem) | ||
40 | { | ||
41 | sem->count = RWSEM_UNLOCKED_VALUE; | ||
42 | spin_lock_init(&sem->wait_lock); | ||
43 | INIT_LIST_HEAD(&sem->wait_list); | ||
44 | } | ||
45 | |||
46 | /* | 32 | /* |
47 | * lock for reading | 33 | * lock for reading |
48 | */ | 34 | */ |