kernel: Let the kernel handle all page table changes when switching processes
It will both change the page table in memory and notify the CPU about the change by itself. This way there is no need to call memory.SetCurrentPageTable() when kernel.setCurrentProcess() and the management is kept internally in the kernel
This commit is contained in:
1 parent
ac9755306c
commit
dbfd830695
6 files changed
+25
-11
No files matched your search
@@ -112,9 +112,6 @@ void ThreadManager::SwitchContext(Thread* new_thread) {
|
||||
|
||||
if (previous_process.get() != current_thread->owner_process) {
|
||||
kernel.SetCurrentProcess(SharedFrom(current_thread->owner_process));
|
||||
kernel.memory.SetCurrentPageTable(
|
||||
¤t_thread->owner_process->vm_manager.page_table);
|
||||
cpu->PageTableChanged(); // notify the CPU the page table in memory has changed
|
||||
}
|
||||
|
||||
cpu->LoadContext(new_thread->context);
|
||||
|
||||
Reference in new issue
Block a user