summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-27 00:34:30 +0100
committerLioncash <mathew1800@gmail.com>2019-11-27 03:55:39 +0100
commite7e939104bb167babec7b5f7d5d8390c85f3cbf4 (patch)
tree47b61e77bf8e0e6798b58716d38679a285e3604b /src/core/hle/kernel
parentcore/memory: Migrate over GetPointerFromVMA() to the Memory class (diff)
downloadyuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.gz
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.bz2
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.lz
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.xz
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.zst
yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/kernel.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a9851113a..1c90546a4 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -154,6 +154,16 @@ struct KernelCore::Impl {
system.CoreTiming().ScheduleEvent(time_interval, preemption_event);
}
+ void MakeCurrentProcess(Process* process) {
+ current_process = process;
+
+ if (process == nullptr) {
+ return;
+ }
+
+ system.Memory().SetCurrentPageTable(*process);
+ }
+
std::atomic<u32> next_object_id{0};
std::atomic<u64> next_kernel_process_id{Process::InitialKIPIDMin};
std::atomic<u64> next_user_process_id{Process::ProcessIDMin};
@@ -208,13 +218,7 @@ void KernelCore::AppendNewProcess(std::shared_ptr<Process> process) {
}
void KernelCore::MakeCurrentProcess(Process* process) {
- impl->current_process = process;
-
- if (process == nullptr) {
- return;
- }
-
- Memory::SetCurrentPageTable(*process);
+ impl->MakeCurrentProcess(process);
}
Process* KernelCore::CurrentProcess() {