diff options
| author | 2018-03-14 19:33:27 -0400 | |
|---|---|---|
| committer | 2018-03-14 19:33:27 -0400 | |
| commit | cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50 (patch) | |
| tree | 6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #213 from Hexagon12/dynarmic-default (diff) | |
| parent | core: Move process creation out of global state. (diff) | |
| download | yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.tar.gz yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.tar.xz yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.zip | |
Merge pull request #236 from bunnei/refactor-process-creation
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.cpp | 4 |
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 | ||
| 100 | void WaitCurrentThread_Sleep() { | 100 | void WaitCurrentThread_Sleep() { |
| @@ -353,7 +353,7 @@ void Thread::BoostPriority(u32 priority) { | |||
| 353 | SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, | 353 | SharedPtr<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, |