aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mutex.h')
-rw-r--r--include/linux/mutex.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 153274f78402..dbb52857b25b 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -23,6 +23,17 @@
struct ww_acquire_ctx;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \
+ , .dep_map = { .name = #lockname }
+#else
+# define __DEP_MAP_MUTEX_INITIALIZER(lockname)
+#endif
+
+#ifdef CONFIG_PREEMPT_RT_FULL
+# include <linux/mutex_rt.h>
+#else
+
/*
* Simple, straightforward mutexes with strict semantics:
*
@@ -114,13 +125,6 @@ do { \
__mutex_init((mutex), #mutex, &__key); \
} while (0)
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \
- , .dep_map = { .name = #lockname }
-#else
-# define __DEP_MAP_MUTEX_INITIALIZER(lockname)
-#endif
-
#define __MUTEX_INITIALIZER(lockname) \
{ .owner = ATOMIC_LONG_INIT(0) \
, .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
@@ -228,4 +232,6 @@ mutex_trylock_recursive(struct mutex *lock)
return mutex_trylock(lock);
}
+#endif /* !PREEMPT_RT_FULL */
+
#endif /* __LINUX_MUTEX_H */