| .. | .. |
|---|
| 14 | 14 | #define __LINUX_RT_MUTEX_H |
|---|
| 15 | 15 | |
|---|
| 16 | 16 | #include <linux/linkage.h> |
|---|
| 17 | | -#include <linux/spinlock_types_raw.h> |
|---|
| 18 | 17 | #include <linux/rbtree.h> |
|---|
| 18 | +#include <linux/spinlock_types.h> |
|---|
| 19 | 19 | |
|---|
| 20 | 20 | extern int max_lock_depth; /* for sysctl */ |
|---|
| 21 | | - |
|---|
| 22 | | -#ifdef CONFIG_DEBUG_MUTEXES |
|---|
| 23 | | -#include <linux/debug_locks.h> |
|---|
| 24 | | -#endif |
|---|
| 25 | 21 | |
|---|
| 26 | 22 | /** |
|---|
| 27 | 23 | * The rt_mutex structure |
|---|
| .. | .. |
|---|
| 35 | 31 | raw_spinlock_t wait_lock; |
|---|
| 36 | 32 | struct rb_root_cached waiters; |
|---|
| 37 | 33 | struct task_struct *owner; |
|---|
| 38 | | - int save_state; |
|---|
| 39 | 34 | #ifdef CONFIG_DEBUG_RT_MUTEXES |
|---|
| 35 | + int save_state; |
|---|
| 40 | 36 | const char *name, *file; |
|---|
| 41 | 37 | int line; |
|---|
| 42 | 38 | void *magic; |
|---|
| .. | .. |
|---|
| 86 | 82 | #define __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) |
|---|
| 87 | 83 | #endif |
|---|
| 88 | 84 | |
|---|
| 89 | | -#define __RT_MUTEX_INITIALIZER_PLAIN(mutexname) \ |
|---|
| 90 | | - .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \ |
|---|
| 85 | +#define __RT_MUTEX_INITIALIZER(mutexname) \ |
|---|
| 86 | + { .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \ |
|---|
| 91 | 87 | , .waiters = RB_ROOT_CACHED \ |
|---|
| 92 | 88 | , .owner = NULL \ |
|---|
| 93 | 89 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ |
|---|
| 94 | | - __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) |
|---|
| 95 | | - |
|---|
| 96 | | -#define __RT_MUTEX_INITIALIZER(mutexname) \ |
|---|
| 97 | | - { __RT_MUTEX_INITIALIZER_PLAIN(mutexname) } |
|---|
| 90 | + __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname)} |
|---|
| 98 | 91 | |
|---|
| 99 | 92 | #define DEFINE_RT_MUTEX(mutexname) \ |
|---|
| 100 | 93 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) |
|---|
| 101 | | - |
|---|
| 102 | | -#define __RT_MUTEX_INITIALIZER_SAVE_STATE(mutexname) \ |
|---|
| 103 | | - { __RT_MUTEX_INITIALIZER_PLAIN(mutexname) \ |
|---|
| 104 | | - , .save_state = 1 } |
|---|
| 105 | 94 | |
|---|
| 106 | 95 | /** |
|---|
| 107 | 96 | * rt_mutex_is_locked - is the mutex locked |
|---|
| .. | .. |
|---|
| 126 | 115 | #endif |
|---|
| 127 | 116 | |
|---|
| 128 | 117 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock); |
|---|
| 129 | | -extern int rt_mutex_lock_killable(struct rt_mutex *lock); |
|---|
| 130 | 118 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, |
|---|
| 131 | 119 | struct hrtimer_sleeper *timeout); |
|---|
| 132 | 120 | |
|---|