diff options
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index e3f08f256..3cf43d290 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -168,13 +168,13 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s | |||
| 168 | std::memset(static_cast<void*>(std::addressof(GetStackParameters())), 0, | 168 | std::memset(static_cast<void*>(std::addressof(GetStackParameters())), 0, |
| 169 | sizeof(StackParameters)); | 169 | sizeof(StackParameters)); |
| 170 | 170 | ||
| 171 | // Setup the TLS, if needed. | ||
| 172 | if (type == ThreadType::User) { | ||
| 173 | tls_address = owner->CreateTLSRegion(); | ||
| 174 | } | ||
| 175 | |||
| 176 | // Set parent, if relevant. | 171 | // Set parent, if relevant. |
| 177 | if (owner != nullptr) { | 172 | if (owner != nullptr) { |
| 173 | // Setup the TLS, if needed. | ||
| 174 | if (type == ThreadType::User) { | ||
| 175 | tls_address = owner->CreateTLSRegion(); | ||
| 176 | } | ||
| 177 | |||
| 178 | parent = owner; | 178 | parent = owner; |
| 179 | parent->Open(); | 179 | parent->Open(); |
| 180 | parent->IncrementThreadCount(); | 180 | parent->IncrementThreadCount(); |