Files
mop3/kernel/amd64/sched1.c
kamkow1 d1d772cb42
All checks were successful
Build documentation / build-and-deploy (push) Successful in 23s
Fix user apps randomly crashing (APIC, GDT layout, syscall entry)
2026-01-14 19:51:18 +01:00

17 lines
412 B
C

#include <amd64/msr-index.h>
#include <amd64/msr.h>
#include <amd64/sched.h>
#include <libk/std.h>
#include <proc/proc.h>
#include <sys/mm.h>
#include <sys/smp.h>
void do_sched (struct proc* proc) {
__asm__ volatile ("cli");
thiscpu->tss.rsp0 = proc->pdata.kernel_stack;
thiscpu->syscall_kernel_stack = proc->pdata.kernel_stack;
amd64_do_sched ((void*)&proc->pdata.regs, (void*)proc->pd.cr3_paddr);
}