mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-12 23:58:17 -05:00
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:
@ -21,6 +21,7 @@
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/lock.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
@ -181,6 +182,7 @@ void KernelCore::AppendNewProcess(SharedPtr<Process> process) {
|
||||
|
||||
void KernelCore::MakeCurrentProcess(Process* process) {
|
||||
impl->current_process = process;
|
||||
Memory::SetCurrentPageTable(&process->VMManager().page_table);
|
||||
}
|
||||
|
||||
Process* KernelCore::CurrentProcess() {
|
||||
|
Reference in New Issue
Block a user