aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rwsem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rwsem.h')
-rw-r--r--include/linux/rwsem.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index 6a6741440cb7..63d406554391 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -25,7 +25,7 @@ struct rw_semaphore;
25/* All arch specific implementations share the same struct */ 25/* All arch specific implementations share the same struct */
26struct rw_semaphore { 26struct rw_semaphore {
27 long count; 27 long count;
28 spinlock_t wait_lock; 28 raw_spinlock_t wait_lock;
29 struct list_head wait_list; 29 struct list_head wait_list;
30#ifdef CONFIG_DEBUG_LOCK_ALLOC 30#ifdef CONFIG_DEBUG_LOCK_ALLOC
31 struct lockdep_map dep_map; 31 struct lockdep_map dep_map;
@@ -56,9 +56,11 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem)
56# define __RWSEM_DEP_MAP_INIT(lockname) 56# define __RWSEM_DEP_MAP_INIT(lockname)
57#endif 57#endif
58 58
59#define __RWSEM_INITIALIZER(name) \ 59#define __RWSEM_INITIALIZER(name) \
60 { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED(name.wait_lock), \ 60 { RWSEM_UNLOCKED_VALUE, \
61 LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } 61 __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \
62 LIST_HEAD_INIT((name).wait_list) \
63 __RWSEM_DEP_MAP_INIT(name) }
62 64
63#define DECLARE_RWSEM(name) \ 65#define DECLARE_RWSEM(name) \
64 struct rw_semaphore name = __RWSEM_INITIALIZER(name) 66 struct rw_semaphore name = __RWSEM_INITIALIZER(name)