mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
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.
This commit is contained in:
parent
c3f668a758
commit
da0b7d1737
Notes:
sideshowbarker
2024-07-18 07:24:01 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/da0b7d17379 Pull-request: https://github.com/SerenityOS/serenity/pull/9236 Reviewed-by: https://github.com/tomuta ✅
2 changed files with 2 additions and 2 deletions
|
@ -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) \
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue