diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-08-15 23:29:01 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-08-17 19:05:29 +0200 |
commit | bb630f9f7a7d43869e4e7f5e4c002207396aea59 (patch) | |
tree | d340e0cebbaf9721f6379f6165e79de44a15ec45 /kernel/locking/mutex.c | |
parent | f8635d509d807c0a9deb273e19bc5a8a19c52895 (diff) | |
download | linux-bb630f9f7a7d43869e4e7f5e4c002207396aea59.tar.bz2 |
locking/rtmutex: Add mutex variant for RT
Add the necessary defines, helpers and API functions for replacing struct mutex on
a PREEMPT_RT enabled kernel with an rtmutex based variant.
No functional change when CONFIG_PREEMPT_RT=n
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211305.081517417@linutronix.de
Diffstat (limited to 'kernel/locking/mutex.c')
-rw-r--r-- | kernel/locking/mutex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 9906ca6cc912..3a65bf4bacfd 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -30,6 +30,7 @@ #include <linux/debug_locks.h> #include <linux/osq_lock.h> +#ifndef CONFIG_PREEMPT_RT #include "mutex.h" #ifdef CONFIG_DEBUG_MUTEXES @@ -1066,7 +1067,8 @@ ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) } EXPORT_SYMBOL(ww_mutex_lock_interruptible); -#endif +#endif /* !CONFIG_DEBUG_LOCK_ALLOC */ +#endif /* !CONFIG_PREEMPT_RT */ /** * atomic_dec_and_mutex_lock - return holding mutex if we dec to 0 |