From 4d6c8aa8bfbb8476ade21d9fa49195f36239d0f0 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 18 Sep 2023 07:19:29 +0200 Subject: [PATCH] kernel: Fix sending signals to threads that are in a long syscall --- kernel/src/thread/Thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/thread/Thread.cpp b/kernel/src/thread/Thread.cpp index 8907c917..ebac3c37 100644 --- a/kernel/src/thread/Thread.cpp +++ b/kernel/src/thread/Thread.cpp @@ -211,7 +211,7 @@ void Thread::send_signal(int signo) check(signo > 0 && signo <= NSIG); pending_signals.set(signo - 1, true); - if (state == ThreadState::Waiting || state == ThreadState::Sleeping) + if (state == ThreadState::Waiting || state == ThreadState::Sleeping || is_in_kernel(®s)) { interrupted = true; wake_up();