Merge pull request #223 from wheremyfoodat/wheremyfoodat-patch-3

Add resource limit for threads to getResourceLimitLimitValues
This commit is contained in:
wheremyfoodat 2023-08-20 18:44:38 +03:00 committed by GitHub
commit d70a1ca7a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,6 +89,7 @@ s32 Kernel::getCurrentResourceValue(const KernelObject* limit, u32 resourceName)
u32 Kernel::getMaxForResource(const KernelObject* limit, u32 resourceName) {
switch (resourceName) {
case ResourceType::Commit: return appResourceLimits.maxCommit;
case ResourceType::Thread: return appResourceLimits.maxThreads;
default: Helpers::panic("Attempted to get the max of unknown kernel resource: %d\n", resourceName);
}
}
}