summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-12 02:14:17 +0100
committerbunnei <bunneidev@gmail.com>2022-03-15 02:14:54 +0100
commit813b2ef2530433c95abca97254c5b614f3d8c615 (patch)
tree270838870905acc327b9fad6635aca4eb5900b61 /src/core/hle/kernel/k_thread.cpp
parentcore: hle: kernel: k_page_table: Add implementations of MapPages, UnmapPages, and FindFreeArea for TLS. (diff)
downloadyuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar.gz
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar.bz2
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar.lz
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar.xz
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.tar.zst
yuzu-813b2ef2530433c95abca97254c5b614f3d8c615.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_thread.cpp4
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 736f39e91..ba7f72c6b 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.