1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

Kernel: Mark sys$alarm as not needing the big lock

Access to Process::m_alarm_timer is serialized via SpinlockProtected,
so there's no longer need for this syscall to use the big lock.
This commit is contained in:
Andreas Kling 2023-04-03 13:19:11 +02:00
parent 496d918e92
commit 5759ea19fb
2 changed files with 3 additions and 3 deletions

View file

@ -12,10 +12,10 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$alarm(unsigned seconds)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
unsigned previous_alarm_remaining = 0;
return m_alarm_timer.with([&](auto& timer) -> ErrorOr<FlatPtr> {
unsigned previous_alarm_remaining = 0;
if (timer) {
bool was_in_use = false;
if (TimerQueue::the().cancel_timer(*timer, &was_in_use)) {