From 7d8940961817d67c9f5ea5e9b644814a292e0451 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 29 Jan 2022 17:06:58 +0100 Subject: [PATCH] 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(). --- Kernel/Thread.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index bd668c1731..e3fe40efe0 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -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