1 #ifndef __LINUX_RWLOCK_TYPES_RT_H
2 #define __LINUX_RWLOCK_TYPES_RT_H
4 #ifndef __LINUX_SPINLOCK_TYPES_H
5 #error "Do not include directly. Include spinlock_types.h instead"
9 * rwlocks - rtmutex which allows single reader recursion
14 unsigned int break_lock;
15 #ifdef CONFIG_DEBUG_LOCK_ALLOC
16 struct lockdep_map dep_map;
20 #ifdef CONFIG_DEBUG_LOCK_ALLOC
21 # define RW_DEP_MAP_INIT(lockname) .dep_map = { .name = #lockname }
23 # define RW_DEP_MAP_INIT(lockname)
26 #define __RW_LOCK_UNLOCKED(name) \
27 { .lock = __RT_MUTEX_INITIALIZER_SAVE_STATE(name.lock), \
28 RW_DEP_MAP_INIT(name) }
30 #define DEFINE_RWLOCK(name) \
31 rwlock_t name __cacheline_aligned_in_smp = __RW_LOCK_UNLOCKED(name)