summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorB3n30 <bene_thomas@web.de>2017-09-25 08:29:32 +0200
committerGitHub <noreply@github.com>2017-09-25 08:29:32 +0200
commitd881dee818e7e59b72cb11cea634eb70bdcd3d35 (patch)
tree4f9b241fb63b90647e2992e83d83de7d25bb5d42 /src/core/hle
parentMerge pull request #2951 from huwpascoe/perf-4 (diff)
parentARM_Interface: Implement PageTableChanged (diff)
downloadyuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.gz
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.bz2
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.lz
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.xz
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.zst
yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/thread.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 324415a36..61378211f 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -178,16 +178,13 @@ static void SwitchContext(Thread* new_thread) {
ready_queue.remove(new_thread->current_priority, new_thread);
new_thread->status = THREADSTATUS_RUNNING;
- Core::CPU().LoadContext(new_thread->context);
- Core::CPU().SetCP15Register(CP15_THREAD_URO, new_thread->GetTLSAddress());
-
if (previous_process != current_thread->owner_process) {
Kernel::g_current_process = current_thread->owner_process;
- Memory::current_page_table = &Kernel::g_current_process->vm_manager.page_table;
- // We have switched processes and thus, page tables, clear the instruction cache so we
- // don't keep stale data from the previous process.
- Core::CPU().ClearInstructionCache();
+ SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table);
}
+
+ Core::CPU().LoadContext(new_thread->context);
+ Core::CPU().SetCP15Register(CP15_THREAD_URO, new_thread->GetTLSAddress());
} else {
current_thread = nullptr;
// Note: We do not reset the current process and current page table when idling because