CeDOS - Commit 1563a589

sched: hotfix kill not working Due to the new sleep function, the process state "terminated" can get overridden. To avoid this, only unblock a process if its pstate is "blocked".
Celina Sophie Kalus
Sat, 09 Dec 2023 21:13:58 +0100
1 files changed, 5 insertions(+), 1 deletions(-)
M kernel/sched/sched.ckernel/sched/sched.c

@@ -250,7 +250,11 @@ }

void sched_unblock(int pid) { PROCESS *process = get_process(pid); - process->state = PSTATE_READY; + + // only unblock previously blocked processes + if (process->state == PSTATE_BLOCKED) { + process->state = PSTATE_READY; + } } int sched_kill(PROCESS_ID pid) {