diff options
author | Joel Granados <joel.granados@kernel.org> | 2025-04-29 15:12:17 +0200 |
---|---|---|
committer | Joel Granados <joel.granados@kernel.org> | 2025-07-23 11:52:47 +0200 |
commit | f1b4f23a52c272f6c1e205e8ec243f563323c5aa (patch) | |
tree | b019a7a252a92457e65690769c4219825d53d8ba /kernel/locking/rtmutex_api.c | |
parent | d0d05f602c1504fb868ed4a560d1465d88a3c5e5 (diff) |
locking/rtmutex: Move max_lock_depth into rtmutex.c
Move the max_lock_depth sysctl table element into rtmutex_api.c. Removed
the rtmutex.h include from sysctl.c. Chose to move into rtmutex_api.c
to avoid multiple registrations every time rtmutex.c is included in other
files.
This is part of a greater effort to move ctl tables into their
respective subsystems which will reduce the merge conflicts in
kernel/sysctl.c.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex_api.c')
-rw-r--r-- | kernel/locking/rtmutex_api.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c index 2d933528a0fa..bafd5af98eae 100644 --- a/kernel/locking/rtmutex_api.c +++ b/kernel/locking/rtmutex_api.c @@ -13,6 +13,24 @@ */ int max_lock_depth = 1024; +static const struct ctl_table rtmutex_sysctl_table[] = { + { + .procname = "max_lock_depth", + .data = &max_lock_depth, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec, + }, +}; + +static int __init init_rtmutex_sysctl(void) +{ + register_sysctl_init("kernel", rtmutex_sysctl_table); + return 0; +} + +subsys_initcall(init_rtmutex_sysctl); + /* * Debug aware fast / slowpath lock,trylock,unlock * |