summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-08-06 14:22:21 +0300
committerAndreas Kling <kling@serenityos.org>2021-08-06 23:36:12 +0200
commitda0b7d17379db0b32d7ea4d816296312178a62b5 (patch)
treedad208f1bb80407d3cadb3f1fefff7de9dca2638 /Kernel
parentc3f668a758addcf80154d42e95a701edce4bbe59 (diff)
downloadserenity-da0b7d17379db0b32d7ea4d816296312178a62b5.zip
Kernel: Disable big process lock for sys$beep()
The PCSpeaker is global and not locked anyways, so there's no need for mutual exclusion between threads in the same process.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/beep.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 7c0ee3b9f1..034e18122d 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -133,7 +133,7 @@ enum class NeedsBigProcessLock {
S(exit_thread, NeedsBigProcessLock::Yes) \
S(mknod, NeedsBigProcessLock::Yes) \
S(writev, NeedsBigProcessLock::Yes) \
- S(beep, NeedsBigProcessLock::Yes) \
+ S(beep, NeedsBigProcessLock::No) \
S(getsockname, NeedsBigProcessLock::Yes) \
S(getpeername, NeedsBigProcessLock::Yes) \
S(socketpair, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Syscalls/beep.cpp b/Kernel/Syscalls/beep.cpp
index 0f0a21a640..0fc0ea7cb7 100644
--- a/Kernel/Syscalls/beep.cpp
+++ b/Kernel/Syscalls/beep.cpp
@@ -11,7 +11,7 @@ namespace Kernel {
KResultOr<FlatPtr> Process::sys$beep()
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
PCSpeaker::tone_on(440);
auto result = Thread::current()->sleep(Time::from_nanoseconds(200'000'000));
PCSpeaker::tone_off();