From 0c64ca8b4dbbb7c0ebd3b349ca4c495087ef7a97 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 20 Mar 2020 11:14:49 +0200 Subject: [PATCH] Revert signal triggering code --- sys/thread.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/thread.c b/sys/thread.c index 3f7b968..8c2f8a3 100644 --- a/sys/thread.c +++ b/sys/thread.c @@ -702,26 +702,26 @@ void thread_signal(struct thread *thr, int signum) { if (thr->cpu == (int) get_cpu()->processor_id) { if (thr == thread_self) { kdebug("Signal will be handled now\n"); - //thread_sigenter(signum); + thread_sigenter(signum); } else { kdebug("Signal will be handled later\n"); thread_signal_set(thr, signum); - //if (thr->state == THREAD_WAITING) { - // timer_remove_sleep(thr); - //} + if (thr->state == THREAD_WAITING) { + timer_remove_sleep(thr); + } - //sched_queue(thr); + sched_queue(thr); } } else if (thr->cpu >= 0) { kdebug("Signal will be handled later (other cpu%d)\n", thr->cpu); thread_signal_set(thr, signum); - //if (thr->state == THREAD_WAITING) { - // timer_remove_sleep(thr); - //} + if (thr->state == THREAD_WAITING) { + timer_remove_sleep(thr); + } - //sched_queue(thr); + sched_queue(thr); } else { kdebug("Signal will be handled later (not running)\n"); thread_signal_set(thr, signum);