diff options
| author | bunnei <bunneidev@gmail.com> | 2020-04-17 16:33:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-17 16:33:08 -0400 |
| commit | b8f5c71f2d7f819821acf036175cce65ab1ae12c (patch) | |
| tree | 151d7ed4e47536dc0e149a7117387b6a502d7da6 /src/core/hle/kernel/resource_limit.h | |
| parent | ca3af2961c5fcda9d3ef4938505bd148856e8176 (diff) | |
| parent | 8bbe74a8dc62cd3933fd08237e707b0059fe8a78 (diff) | |
Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
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 |
