1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +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:
Idan Horowitz 2021-08-06 14:22:21 +03:00 committed by Andreas Kling
parent c3f668a758
commit da0b7d1737
2 changed files with 2 additions and 2 deletions

View file

@ -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();