1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

Kernel: Don't dispatch signals in Thread::block_impl()

If the blocker is interrupted by a signal, that signal will be delivered
to the process when returning to userspace (at the syscall exit point.)
We don't have to perform the dispatch manually in Thread::block_impl().
This commit is contained in:
Andreas Kling 2022-01-29 17:06:58 +01:00
parent 677da0288c
commit 7d89409618

View file

@ -245,12 +245,6 @@ Thread::BlockResult Thread::block_impl(BlockTimeout const& timeout, Blocker& blo
break;
}
if (blocker.was_interrupted_by_signal()) {
SpinlockLocker scheduler_lock(g_scheduler_lock);
SpinlockLocker lock(m_lock);
dispatch_one_pending_signal();
}
// Notify the blocker that we are no longer blocking. It may need
// to clean up now while we're still holding m_lock
auto result = blocker.end_blocking({}, did_timeout); // calls was_unblocked internally