summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-13 17:49:59 -0400
committerGravatar bunnei2018-03-14 18:42:19 -0400
commit7d6653268f68dea8bc39288e3a27bc499b7b8154 (patch)
tree6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/core/hle/kernel/thread.cpp
parentMerge pull request #213 from Hexagon12/dynarmic-default (diff)
downloadyuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.gz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.xz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.zip
core: Move process creation out of global state.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 25828777e..2394620eb 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -94,7 +94,7 @@ void Thread::Stop() {
94 u64 tls_page = (tls_address - Memory::TLS_AREA_VADDR) / Memory::PAGE_SIZE; 94 u64 tls_page = (tls_address - Memory::TLS_AREA_VADDR) / Memory::PAGE_SIZE;
95 u64 tls_slot = 95 u64 tls_slot =
96 ((tls_address - Memory::TLS_AREA_VADDR) % Memory::PAGE_SIZE) / Memory::TLS_ENTRY_SIZE; 96 ((tls_address - Memory::TLS_AREA_VADDR) % Memory::PAGE_SIZE) / Memory::TLS_ENTRY_SIZE;
97 Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); 97 Core::CurrentProcess()->tls_slots[tls_page].reset(tls_slot);
98} 98}
99 99
100void WaitCurrentThread_Sleep() { 100void WaitCurrentThread_Sleep() {
@@ -353,7 +353,7 @@ void Thread::BoostPriority(u32 priority) {
353SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, 353SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority,
354 SharedPtr<Process> owner_process) { 354 SharedPtr<Process> owner_process) {
355 // Setup page table so we can write to memory 355 // Setup page table so we can write to memory
356 SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table); 356 SetCurrentPageTable(&Core::CurrentProcess()->vm_manager.page_table);
357 357
358 // Initialize new "main" thread 358 // Initialize new "main" thread
359 auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0, 359 auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0,