From dd0dcfe4c5f9ec44293b421b3f8541e3aba1715f Mon Sep 17 00:00:00 2001 From: FKHals <5229803-FKHals@users.noreply.gitlab.com> Date: Fri, 21 Apr 2023 10:07:09 +0200 Subject: [PATCH] [SQUASH ME] Make it work. --- kernel/exit.c | 1 + kernel/sched/pb.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index 5bcf911abdc2..ecfda8819039 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -772,6 +772,7 @@ void __noreturn do_exit(long code) rq = this_rq(); + //FIXME: This disclaimer is not really true anymore (since i dont follow it and it works either way) /** * BEWARE: * We want to update the plan runtime model not too early to ensure that the exiting process diff --git a/kernel/sched/pb.c b/kernel/sched/pb.c index 992effee6187..b3204c169aa4 100644 --- a/kernel/sched/pb.c +++ b/kernel/sched/pb.c @@ -291,10 +291,10 @@ static void dequeue_task_pb(struct rq *rq, struct task_struct *p, int flags) bool process_exited = false; - printk("Dequeue task: %u\n", p->pid); + //printk("Dequeue task: %u\n", p->pid); - if (pb->waiting_on_io) { - printk("Waiting for IO\n", p->pid); + if (pb->waiting_on_io && p->state != TASK_DEAD) { + printk("Waiting for IO\n"); return; } pb->waiting_on_io = 1; -- GitLab