Revert signal triggering code

This commit is contained in:
Mark
2020-03-20 11:14:49 +02:00
parent 8d6ecc7134
commit 0c64ca8b4d
+9 -9
View File
@@ -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);