diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-03-26 16:29:38 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-29 15:57:03 +0200 |
commit | f5a98866e506a816f6a855df1e7ed41e1891ec66 (patch) | |
tree | 54befe001c16e5f0c684202ebb102dcb89f75805 /kernel/locking/rtmutex_common.h | |
parent | locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs (diff) | |
download | linux-f5a98866e506a816f6a855df1e7ed41e1891ec66.tar.xz linux-f5a98866e506a816f6a855df1e7ed41e1891ec66.zip |
locking/rtmutex: Decrapify __rt_mutex_init()
The conditional debug handling is just another layer of obfuscation. Split
the function so rt_mutex_init_proxy_locked() can invoke the inner init and
__rt_mutex_init() gets the full treatment.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210326153943.955697588@linutronix.de
Diffstat (limited to '')
-rw-r--r-- | kernel/locking/rtmutex_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index 8596a71774e0..41adf8be991b 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h @@ -100,6 +100,13 @@ enum rtmutex_chainwalk { RT_MUTEX_FULL_CHAINWALK, }; +static inline void __rt_mutex_basic_init(struct rt_mutex *lock) +{ + lock->owner = NULL; + raw_spin_lock_init(&lock->wait_lock); + lock->waiters = RB_ROOT_CACHED; +} + /* * PI-futex support (proxy locking functions, etc.): */ |