Fix scheduler starvation, use lists for scheduling
All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s

This commit is contained in:
2026-01-22 11:54:52 +01:00
parent 7eceecf6e3
commit fea0999726
9 changed files with 83 additions and 54 deletions

View File

@@ -27,7 +27,7 @@ struct cpu {
spin_lock_t lock;
struct rb_node_link* proc_run_q;
struct list_node_link* proc_run_q;
struct proc* proc_current;
};

View File

@@ -25,12 +25,8 @@ int amd64_syscall_dispatch (void* stack_ptr) {
struct proc* caller = thiscpu->proc_current;
__asm__ volatile ("sti");
int result = func (caller, regs, regs->rdi, regs->rsi, regs->rdx, regs->r10, regs->r8, regs->r9);
__asm__ volatile ("cli");
return result;
}