.. | .. |
---|
22 | 22 | |
---|
23 | 23 | struct ww_acquire_ctx; |
---|
24 | 24 | |
---|
| 25 | +#ifdef CONFIG_DEBUG_LOCK_ALLOC |
---|
| 26 | +# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ |
---|
| 27 | + , .dep_map = { .name = #lockname } |
---|
| 28 | +#else |
---|
| 29 | +# define __DEP_MAP_MUTEX_INITIALIZER(lockname) |
---|
| 30 | +#endif |
---|
| 31 | + |
---|
| 32 | +#ifdef CONFIG_PREEMPT_RT_FULL |
---|
| 33 | +# include <linux/mutex_rt.h> |
---|
| 34 | +#else |
---|
| 35 | + |
---|
25 | 36 | /* |
---|
26 | 37 | * Simple, straightforward mutexes with strict semantics: |
---|
27 | 38 | * |
---|
.. | .. |
---|
117 | 128 | \ |
---|
118 | 129 | __mutex_init((mutex), #mutex, &__key); \ |
---|
119 | 130 | } while (0) |
---|
120 | | - |
---|
121 | | -#ifdef CONFIG_DEBUG_LOCK_ALLOC |
---|
122 | | -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ |
---|
123 | | - , .dep_map = { .name = #lockname } |
---|
124 | | -#else |
---|
125 | | -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) |
---|
126 | | -#endif |
---|
127 | 131 | |
---|
128 | 132 | #define __MUTEX_INITIALIZER(lockname) \ |
---|
129 | 133 | { .owner = ATOMIC_LONG_INIT(0) \ |
---|
.. | .. |
---|
229 | 233 | return mutex_trylock(lock); |
---|
230 | 234 | } |
---|
231 | 235 | |
---|
| 236 | +#endif /* !PREEMPT_RT_FULL */ |
---|
| 237 | + |
---|
232 | 238 | #endif /* __LINUX_MUTEX_H */ |
---|