From e24c6dab93d00676dfb22743534825bb6aa90d7c Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 28 Jan 2021 21:49:47 -0800 Subject: hle: kernel: KThread: Release thread resource on thread exit. --- src/core/hle/kernel/k_thread.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/hle') 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); } } -- cgit v1.2.3