diff options
author | dzwdz | 2022-04-28 19:03:15 +0200 |
---|---|---|
committer | dzwdz | 2022-04-28 19:03:15 +0200 |
commit | 8f5a9e28d1e030ed2b9532e9d87b883a9f2e8f15 (patch) | |
tree | d6c25c271d8dedd55d54355a2405802f708badd1 | |
parent | 5d88324e89c48427c2ab66456e761e4e46eefc1c (diff) |
kernel/proc: explicitly handle all process states in switch()es
-rw-r--r-- | src/kernel/proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 1fd392a..5b96760 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -219,6 +219,8 @@ void process_transition(struct process *p, enum process_state state) { case PS_WAITS4IRQ: assert(last == PS_WAITS4FS); break; + + case PS_LAST: panic_invalid_state(); } } @@ -265,7 +267,9 @@ void process_kill(struct process *p, int ret) { p->controlled->handler = NULL; break; - default: + case PS_DEAD: + case PS_DEADER: + case PS_LAST: kprintf("process_kill unexpected state 0x%x\n", p->state); panic_invalid_state(); } |