Implement GetResourceLimitValue for thread count (#438)

This commit is contained in:
wheremyfoodat 2024-03-07 17:48:08 +00:00 committed by GitHub
parent 25d8e5807f
commit e4bea43fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -82,6 +82,7 @@ s32 Kernel::getCurrentResourceValue(const KernelObject* limit, u32 resourceName)
const auto data = static_cast<ResourceLimits*>(limit->data);
switch (resourceName) {
case ResourceType::Commit: return mem.usedUserMemory;
case ResourceType::Thread: return threadIndices.size();
default: Helpers::panic("Attempted to get current value of unknown kernel resource: %d\n", resourceName);
}
}