summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
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 a055a5002..ec529e7f2 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -65,7 +65,7 @@ void Thread::Stop() {
65 owner_process->UnregisterThread(this); 65 owner_process->UnregisterThread(this);
66 66
67 // Mark the TLS slot in the thread's page as free. 67 // Mark the TLS slot in the thread's page as free.
68 owner_process->FreeTLSSlot(tls_address); 68 owner_process->FreeTLSRegion(tls_address);
69} 69}
70 70
71void Thread::WakeAfterDelay(s64 nanoseconds) { 71void Thread::WakeAfterDelay(s64 nanoseconds) {
@@ -205,9 +205,9 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name
205 thread->name = std::move(name); 205 thread->name = std::move(name);
206 thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap(); 206 thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap();
207 thread->owner_process = &owner_process; 207 thread->owner_process = &owner_process;
208 thread->tls_address = thread->owner_process->CreateTLSRegion();
208 thread->scheduler = &system.Scheduler(processor_id); 209 thread->scheduler = &system.Scheduler(processor_id);
209 thread->scheduler->AddThread(thread); 210 thread->scheduler->AddThread(thread);
210 thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread);
211 211
212 thread->owner_process->RegisterThread(thread.get()); 212 thread->owner_process->RegisterThread(thread.get());
213 213