diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-17 22:33:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 22:33:08 +0200 |
commit | b8f5c71f2d7f819821acf036175cce65ab1ae12c (patch) | |
tree | 151d7ed4e47536dc0e149a7117387b6a502d7da6 /src/core/hle/kernel/resource_limit.h | |
parent | Merge pull request #3682 from lioncash/uam (diff) | |
parent | core: hle: Address various feedback & code cleanup. (diff) | |
download | yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.gz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.bz2 yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.lz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.xz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.zst yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.zip |
Diffstat (limited to 'src/core/hle/kernel/resource_limit.h')
-rw-r--r-- | src/core/hle/kernel/resource_limit.h | 12 |
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 |