Implement waiting for process, CE add command cancelation, rctx many cpus
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m27s

This commit is contained in:
2026-03-01 22:59:04 +01:00
parent 858e55118b
commit 9043c4f9ec
18 changed files with 308 additions and 89 deletions

View File

@@ -109,6 +109,26 @@ struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t ent
}
void proc_cleanup (struct proc* proc, struct reschedule_ctx* rctx) {
spin_lock (&proc->lock);
spin_lock (&proc->done_sq.lock);
while (proc->done_sq.proc_list != NULL) {
struct list_node_link* node = proc->done_sq.proc_list;
struct proc_sq_entry* sq_entry = list_entry (node, struct proc_sq_entry, sq_link);
struct proc* suspended_proc = sq_entry->proc;
spin_unlock (&proc->done_sq.lock);
spin_unlock (&proc->lock);
proc_sq_resume (suspended_proc, sq_entry, rctx);
spin_lock (&proc->lock);
spin_lock (&proc->done_sq.lock);
}
spin_unlock (&proc->done_sq.lock);
spin_unlock (&proc->lock);
proc_sqs_cleanup (proc);
proc_mutexes_cleanup (proc, rctx);