Remove dead process from it's suspension queues

This commit is contained in:
2026-01-25 22:39:29 +01:00
parent 5e16bb647c
commit 18f791222e
3 changed files with 34 additions and 9 deletions

View File

@@ -32,8 +32,10 @@ static void proc_mutex_suspend (struct proc* proc, struct proc_suspension_q* sq,
atomic_store (&proc->state, PROC_SUSPENDED);
/* append to sq's list */
list_append (sq->proc_list, &sq_entry->sq_link);
/* append to proc's list */
list_append (proc->sq_entries, &sq_entry->proc_link);
list_remove (cpu->proc_run_q, &proc->cpu_run_q_link);
@@ -60,7 +62,10 @@ static void proc_mutex_resume (struct proc* proc, struct proc_sq_entry* sq_entry
spin_lock (&proc->lock, &ctxpr);
spin_lock (&sq->lock, &ctxsq);
/* remove from sq's list */
list_remove (sq->proc_list, &sq_entry->sq_link);
/* remove from proc's list */
list_remove (proc->sq_entries, &sq_entry->proc_link);
proc->cpu = cpu;