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
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue