summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/resource_limit.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-23 20:30:22 +0100
committerbunnei <bunneidev@gmail.com>2020-04-17 06:59:27 +0200
commitb0e3cbef7ae60736f356e346b9c1e52115db752f (patch)
treea8e9b02af9cb2a254e32aaa2d5b2d325039a06ea /src/core/hle/kernel/resource_limit.h
parentloader: nso: Fix loading of static objects to be properly sized and aligned. (diff)
downloadyuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar.gz
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar.bz2
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar.lz
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar.xz
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.tar.zst
yuzu-b0e3cbef7ae60736f356e346b9c1e52115db752f.zip
Diffstat (limited to 'src/core/hle/kernel/resource_limit.h')
-rw-r--r--src/core/hle/kernel/resource_limit.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/kernel/resource_limit.h b/src/core/hle/kernel/resource_limit.h
index 53b89e621..936cc4d0f 100644
--- a/src/core/hle/kernel/resource_limit.h
+++ b/src/core/hle/kernel/resource_limit.h
@@ -51,6 +51,11 @@ public:
return HANDLE_TYPE;
}
+ bool Reserve(ResourceType resource, s64 amount);
+ bool Reserve(ResourceType resource, s64 amount, u64 timeout);
+ void Release(ResourceType resource, u64 amount);
+ void Release(ResourceType resource, u64 used_amount, u64 available_amount);
+
/**
* Gets the current value for the specified resource.
* @param resource Requested resource type
@@ -91,10 +96,9 @@ private:
using ResourceArray =
std::array<s64, static_cast<std::size_t>(ResourceType::ResourceTypeCount)>;
- /// Maximum values a resource type may reach.
- ResourceArray limits{};
- /// Current resource limit values.
- ResourceArray values{};
+ ResourceArray limit{};
+ ResourceArray current{};
+ ResourceArray available{};
};
} // namespace Kernel