diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 372cafdd9..1645437b6 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -103,8 +103,8 @@ void Thread::Stop() { | |||
| 103 | ReleaseThreadMutexes(this); | 103 | ReleaseThreadMutexes(this); |
| 104 | 104 | ||
| 105 | // Mark the TLS slot in the thread's page as free. | 105 | // Mark the TLS slot in the thread's page as free. |
| 106 | u32 tls_page = (tls_address - Memory::TLS_AREA_VADDR) / Memory::PAGE_SIZE; | 106 | u64 tls_page = (tls_address - Memory::TLS_AREA_VADDR) / Memory::PAGE_SIZE; |
| 107 | u32 tls_slot = | 107 | u64 tls_slot = |
| 108 | ((tls_address - Memory::TLS_AREA_VADDR) % Memory::PAGE_SIZE) / Memory::TLS_ENTRY_SIZE; | 108 | ((tls_address - Memory::TLS_AREA_VADDR) % Memory::PAGE_SIZE) / Memory::TLS_ENTRY_SIZE; |
| 109 | Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); | 109 | Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); |
| 110 | } | 110 | } |
| @@ -184,7 +184,7 @@ static void SwitchContext(Thread* new_thread) { | |||
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | Core::CPU().LoadContext(new_thread->context); | 186 | Core::CPU().LoadContext(new_thread->context); |
| 187 | Core::CPU().SetCP15Register(CP15_THREAD_URO, new_thread->GetTLSAddress()); | 187 | Core::CPU().SetTlsAddress(new_thread->GetTLSAddress()); |
| 188 | } else { | 188 | } else { |
| 189 | current_thread = nullptr; | 189 | current_thread = nullptr; |
| 190 | // Note: We do not reset the current process and current page table when idling because | 190 | // Note: We do not reset the current process and current page table when idling because |
| @@ -369,7 +369,7 @@ static void ResetThreadContext(ARM_Interface::ThreadContext& context, VAddr stac | |||
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, u32 priority, | 371 | ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, u32 priority, |
| 372 | u32 arg, s32 processor_id, VAddr stack_top, | 372 | u64 arg, s32 processor_id, VAddr stack_top, |
| 373 | SharedPtr<Process> owner_process) { | 373 | SharedPtr<Process> owner_process) { |
| 374 | // Check if priority is in ranged. Lowest priority -> highest priority id. | 374 | // Check if priority is in ranged. Lowest priority -> highest priority id. |
| 375 | if (priority > THREADPRIO_LOWEST) { | 375 | if (priority > THREADPRIO_LOWEST) { |
| @@ -493,7 +493,7 @@ void Thread::BoostPriority(u32 priority) { | |||
| 493 | current_priority = priority; | 493 | current_priority = priority; |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | SharedPtr<Thread> SetupMainThread(u32 entry_point, u32 priority, SharedPtr<Process> owner_process) { | 496 | SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, SharedPtr<Process> owner_process) { |
| 497 | // Setup page table so we can write to memory | 497 | // Setup page table so we can write to memory |
| 498 | SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table); | 498 | SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table); |
| 499 | 499 | ||