hc
2023-11-30 6c9be420e167ee7ce45c0309586f09ddab28ac15
kernel/include/linux/mutex.h
....@@ -22,6 +22,17 @@
2222
2323 struct ww_acquire_ctx;
2424
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
+
2536 /*
2637 * Simple, straightforward mutexes with strict semantics:
2738 *
....@@ -117,13 +128,6 @@
117128 \
118129 __mutex_init((mutex), #mutex, &__key); \
119130 } 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
127131
128132 #define __MUTEX_INITIALIZER(lockname) \
129133 { .owner = ATOMIC_LONG_INIT(0) \
....@@ -229,4 +233,6 @@
229233 return mutex_trylock(lock);
230234 }
231235
236
+#endif /* !PREEMPT_RT_FULL */
237
+
232238 #endif /* __LINUX_MUTEX_H */