summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-03 18:39:07 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-04 10:33:42 +0200
commite71b84228edc3ddd5c0683eeddd5bed3214cd41e (patch)
tree4bc49f8742d643d782f6b318262c347a7b7e40e3 /Kernel
parent3108daecc5841236bfc596e1321d6e1503278a60 (diff)
downloadserenity-e71b84228edc3ddd5c0683eeddd5bed3214cd41e.zip
Kernel: Mark sys$kill as not needing the big lock
This syscall sends a signal to other threads or itself. This mechanism is already guarded by locking mechanisms, and widely used within the kernel without help from the big lock.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/kill.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index c2f1d6d456..f87259a7ae 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -115,7 +115,7 @@ enum class NeedsBigProcessLock {
S(join_thread, NeedsBigProcessLock::Yes) \
S(jail_create, NeedsBigProcessLock::No) \
S(jail_attach, NeedsBigProcessLock::No) \
- S(kill, NeedsBigProcessLock::Yes) \
+ S(kill, NeedsBigProcessLock::No) \
S(kill_thread, NeedsBigProcessLock::Yes) \
S(killpg, NeedsBigProcessLock::Yes) \
S(link, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/kill.cpp b/Kernel/Syscalls/kill.cpp
index ba8e4e805e..d9ba3b3d50 100644
--- a/Kernel/Syscalls/kill.cpp
+++ b/Kernel/Syscalls/kill.cpp
@@ -102,7 +102,7 @@ ErrorOr<void> Process::do_killself(int signal)
ErrorOr<FlatPtr> Process::sys$kill(pid_t pid_or_pgid, int signal)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
if (pid_or_pgid == pid().value())
TRY(require_promise(Pledge::stdio));
else