aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/resource_limit.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-30 10:02:50 -0400
committerGitHub <noreply@github.com>2018-08-30 10:02:50 -0400
commit5094dfa081c7275e35496374a42996b11f0f6005 (patch)
tree8cdfb8c270c6299a1b172fb9c14856684bedf084 /src/core/hle/kernel/resource_limit.h
parent42ef40884f222bfd0dfa08cd56e01e89b0e2ab0f (diff)
parent0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (diff)
Merge pull request #1198 from lioncash/kernel
kernel: Eliminate kernel global state
Diffstat (limited to 'src/core/hle/kernel/resource_limit.h')
-rw-r--r--src/core/hle/kernel/resource_limit.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/core/hle/kernel/resource_limit.h b/src/core/hle/kernel/resource_limit.h
index 0fa141db3..219e49562 100644
--- a/src/core/hle/kernel/resource_limit.h
+++ b/src/core/hle/kernel/resource_limit.h
@@ -9,6 +9,8 @@
namespace Kernel {
+class KernelCore;
+
enum class ResourceLimitCategory : u8 {
APPLICATION = 0,
SYS_APPLET = 1,
@@ -34,14 +36,7 @@ public:
/**
* Creates a resource limit object.
*/
- static SharedPtr<ResourceLimit> Create(std::string name = "Unknown");
-
- /**
- * Retrieves the resource limit associated with the specified resource limit category.
- * @param category The resource limit category
- * @returns The resource limit associated with the category
- */
- static SharedPtr<ResourceLimit> GetForCategory(ResourceLimitCategory category);
+ static SharedPtr<ResourceLimit> Create(KernelCore& kernel, std::string name = "Unknown");
std::string GetTypeName() const override {
return "ResourceLimit";
@@ -113,14 +108,8 @@ public:
s32 current_cpu_time = 0;
private:
- ResourceLimit();
+ explicit ResourceLimit(KernelCore& kernel);
~ResourceLimit() override;
};
-/// Initializes the resource limits
-void ResourceLimitsInit();
-
-// Destroys the resource limits
-void ResourceLimitsShutdown();
-
} // namespace Kernel