From 3bc7c52ade9e4109582554e53b2369eab937d1b0 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 1 May 2020 05:23:37 -0700 Subject: [PATCH] pm: correct extra application thread allocation counts --- stratosphere/pm/source/impl/pm_resource_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratosphere/pm/source/impl/pm_resource_manager.cpp b/stratosphere/pm/source/impl/pm_resource_manager.cpp index 3b5b2cc8b..aeedc11ab 100644 --- a/stratosphere/pm/source/impl/pm_resource_manager.cpp +++ b/stratosphere/pm/source/impl/pm_resource_manager.cpp @@ -219,8 +219,8 @@ namespace ams::pm::resource { R_ABORT_UNLESS(svc::GetResourceLimitLimitValue(&total_threads_available, GetResourceLimitHandle(ResourceLimitGroup_System), svc::LimitableResource_ThreadCountMax)); /* See how many threads we're expecting. */ - const s64 total_threads_allocated = g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_ThreadCountMax] - - g_resource_limits[ResourceLimitGroup_Application][svc::LimitableResource_ThreadCountMax] - + const s64 total_threads_allocated = g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_ThreadCountMax] + + g_resource_limits[ResourceLimitGroup_Application][svc::LimitableResource_ThreadCountMax] + g_resource_limits[ResourceLimitGroup_Applet][svc::LimitableResource_ThreadCountMax]; /* Ensure we don't over-commit threads. */