diff options
| author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2019-07-04 15:32:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-04 15:32:32 -0400 |
| commit | 54a02d14fd38282e446a56892a1c45f558ee0e42 (patch) | |
| tree | 79a86a51973712ee8307071a6c5dc471289746eb /src/core/hle/kernel/thread.cpp | |
| parent | cca663792f93b03382c62392655b01a21e8e388b (diff) | |
| parent | e23110bd9fce557ee9ad8542866bc552eda8713f (diff) | |
Merge pull request #2555 from lioncash/tls
kernel/process: Decouple TLS handling from threads
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 a055a5002..ec529e7f2 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -65,7 +65,7 @@ void Thread::Stop() { owner_process->UnregisterThread(this); // Mark the TLS slot in the thread's page as free. - owner_process->FreeTLSSlot(tls_address); + owner_process->FreeTLSRegion(tls_address); } void Thread::WakeAfterDelay(s64 nanoseconds) { @@ -205,9 +205,9 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name thread->name = std::move(name); thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap(); thread->owner_process = &owner_process; + thread->tls_address = thread->owner_process->CreateTLSRegion(); thread->scheduler = &system.Scheduler(processor_id); thread->scheduler->AddThread(thread); - thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread); thread->owner_process->RegisterThread(thread.get()); |
