diff options
| author | bunnei <bunneidev@gmail.com> | 2022-03-11 17:14:17 -0800 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2022-03-14 18:14:54 -0700 |
| commit | 2b881f4ccc71f39f4e263afc7d817cc6e542c15d (patch) | |
| tree | 270838870905acc327b9fad6635aca4eb5900b61 /src/core/hle/kernel/k_thread.cpp | |
| parent | c8dba7c578afa338e9a0760f9591d01f6ec4df5c (diff) | |
core: hle: kernel: k_process: Implement thread local storage accurately.
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 736f39e919..ba7f72c6bc 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -210,7 +210,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s if (owner != nullptr) { // Setup the TLS, if needed. if (type == ThreadType::User) { - tls_address = owner->CreateTLSRegion(); + R_TRY(owner->CreateThreadLocalRegion(std::addressof(tls_address))); } parent = owner; @@ -305,7 +305,7 @@ void KThread::Finalize() { // If the thread has a local region, delete it. if (tls_address != 0) { - parent->FreeTLSRegion(tls_address); + ASSERT(parent->DeleteThreadLocalRegion(tls_address).IsSuccess()); } // Release any waiters. |
