aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-15 22:47:54 +0200
committerMarvin Borner2021-04-15 22:47:54 +0200
commit4d4e784770b576199b18f22100689125a18bfd9a (patch)
tree5009a65f79af966fa6253307e64271479b1b0bed /kernel/features/proc.c
parent462eaa9531b9e62916b02ab52759cd070de755d3 (diff)
Basic block/unblock
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r--kernel/features/proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index a71919e..6ddeb32 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -124,6 +124,8 @@ void proc_reset_quantum(struct proc *proc)
void proc_state(struct proc *proc, enum proc_state state)
{
+ assert(proc != idle_proc->data);
+
if (state == PROC_RUNNING && !list_first_data(proc_list_running, proc)) {
assert(list_remove(proc_list_blocked, list_first_data(proc_list_blocked, proc)));
assert(list_add(proc_list_running, proc));