summaryrefslogtreecommitdiff
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
commite24c6dab93d00676dfb22743534825bb6aa90d7c (patch)
tree3f09d1b287cda7a6d333fe5b65a55454104d4a52
parent10738839ad7b9abbcf8ac64c6e58de63a9fbae76 (diff)
hle: kernel: KThread: Release thread resource on thread exit.
-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 45ad589d9..aa100e139 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);
}
}