proc_wait_for () lock wait_proc to avoid races
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 55s
Build documentation / build-and-deploy (push) Successful in 37s

This commit is contained in:
2026-04-16 22:00:42 +02:00
parent 9346a10d74
commit 7660bcab82

View File

@@ -378,7 +378,11 @@ void proc_kill (struct proc* proc, struct reschedule_ctx* rctx) {
}
void proc_wait_for (struct proc* proc, struct reschedule_ctx* rctx, struct proc* wait_proc) {
uint64_t fwp;
spin_lock (&wait_proc->lock, &fwp);
proc_sq_suspend (proc, &wait_proc->done_sq, NULL, 0, rctx, NULL, NULL);
spin_unlock (&wait_proc->lock, fwp);
}
void proc_irq_sched (void* arg, void* regs, bool user, struct reschedule_ctx* rctx) {