Kernel: Disable big process lock for sys$getkeymap

This syscall only reads non process-related global values, and as such
doesn't need to hold the big lock.
This commit is contained in:
Idan Horowitz 2021-08-06 14:47:26 +03:00 committed by Andreas Kling
parent 48325e2959
commit 1a08694dfc
Notes: sideshowbarker 2024-07-18 07:23:40 +09:00
2 changed files with 2 additions and 1 deletions

View file

@ -155,7 +155,7 @@ enum class NeedsBigProcessLock {
S(get_process_name, NeedsBigProcessLock::Yes) \
S(fchdir, NeedsBigProcessLock::Yes) \
S(getrandom, NeedsBigProcessLock::No) \
S(getkeymap, NeedsBigProcessLock::Yes) \
S(getkeymap, NeedsBigProcessLock::No) \
S(setkeymap, NeedsBigProcessLock::Yes) \
S(clock_gettime, NeedsBigProcessLock::Yes) \
S(clock_settime, NeedsBigProcessLock::Yes) \

View file

@ -48,6 +48,7 @@ KResultOr<FlatPtr> Process::sys$setkeymap(Userspace<const Syscall::SC_setkeymap_
KResultOr<FlatPtr> Process::sys$getkeymap(Userspace<const Syscall::SC_getkeymap_params*> user_params)
{
VERIFY_NO_PROCESS_BIG_LOCK(this);
REQUIRE_PROMISE(getkeymap);
Syscall::SC_getkeymap_params params;