kernel: Handle page table switching within MakeCurrentProcess()
Centralizes the page table switching to one spot, rather than making calling code deal with it everywhere.
This commit is contained in:
parent
864280fabc
commit
e779686a76
4 changed files with 3 additions and 6 deletions
|
@ -101,7 +101,6 @@ void Scheduler::SwitchContext(Thread* new_thread) {
|
|||
auto* const thread_owner_process = current_thread->GetOwnerProcess();
|
||||
if (previous_process != thread_owner_process) {
|
||||
system.Kernel().MakeCurrentProcess(thread_owner_process);
|
||||
Memory::SetCurrentPageTable(&thread_owner_process->VMManager().page_table);
|
||||
}
|
||||
|
||||
cpu_core.LoadContext(new_thread->GetContext());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue