aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-28 21:49:47 -0800
committerbunnei <bunneidev@gmail.com>2021-01-28 21:49:47 -0800
commitd09ade6cab7cdeda502f9e84199c6ece92d6b969 (patch)
tree3f09d1b287cda7a6d333fe5b65a55454104d4a52 /src/core/hle/kernel/k_thread.cpp
parenta96667d30c56e8740b6c13eadc31adc34e49268b (diff)
hle: kernel: KThread: Release thread resource on thread exit.
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r--src/core/hle/kernel/k_thread.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 45ad589d9b..aa100e1390 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -247,6 +247,7 @@ void KThread::Finalize() {
// Decrement the parent process's thread count.
if (parent != nullptr) {
parent->DecrementThreadCount();
+ parent->GetResourceLimit()->Release(ResourceType::Threads, 1);
}
}