Redesign reschedule points, allow one operation to reschedule many cpus at once
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m12s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m12s
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <amd64/msr.h>
|
||||
#include <amd64/sched.h>
|
||||
#include <libk/std.h>
|
||||
#include <libk/string.h>
|
||||
#include <proc/proc.h>
|
||||
#include <sync/spin_lock.h>
|
||||
#include <sys/mm.h>
|
||||
@@ -14,8 +15,12 @@ void do_sched (struct proc* proc, spin_lock_t* cpu_lock) {
|
||||
thiscpu->syscall_kernel_stack = proc->pdata.kernel_stack;
|
||||
amd64_wrmsr (MSR_FS_BASE, proc->pdata.fs_base);
|
||||
|
||||
void* cr3 = (void*)proc->procgroup->pd.cr3_paddr;
|
||||
struct saved_regs regs;
|
||||
memcpy (®s, &proc->pdata.regs, sizeof (regs));
|
||||
|
||||
spin_unlock (&proc->lock);
|
||||
spin_unlock (cpu_lock);
|
||||
|
||||
amd64_do_sched ((void*)&proc->pdata.regs, (void*)proc->procgroup->pd.cr3_paddr);
|
||||
amd64_do_sched ((void*)®s, cr3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user