summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2021-05-02 00:44:28 -0700
committerGravatar bunnei2021-05-05 16:40:54 -0700
commiteae107d0e9764ac2773a20e744c17201cfe2f814 (patch)
tree2e251c148dd8e6489d4a0626ad0d9e448ee63597
parenthle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. (diff)
downloadyuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.gz
yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.xz
yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.zip
kernel: svc: Remove unused RetrieveResourceLimitValue function.
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 80d70a816..52011be9c 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -141,38 +141,6 @@ enum class ResourceLimitValueType {
141 PeakValue, 141 PeakValue,
142}; 142};
143 143
144ResultVal<s64> RetrieveResourceLimitValue(Core::System& system, Handle resource_limit,
145 u32 resource_type, ResourceLimitValueType value_type) {
146 std::lock_guard lock{HLE::g_hle_lock};
147 const auto type = static_cast<LimitableResource>(resource_type);
148 if (!IsValidResourceType(type)) {
149 LOG_ERROR(Kernel_SVC, "Invalid resource limit type: '{}'", resource_type);
150 return ResultInvalidEnumValue;
151 }
152
153 const auto* const current_process = system.Kernel().CurrentProcess();
154 ASSERT(current_process != nullptr);
155
156 auto resource_limit_object =
157 current_process->GetHandleTable().GetObject<KResourceLimit>(resource_limit);
158 if (resource_limit_object.IsNull()) {
159 LOG_ERROR(Kernel_SVC, "Handle to non-existent resource limit instance used. Handle={:08X}",
160 resource_limit);
161 return ResultInvalidHandle;
162 }
163
164 switch (value_type) {
165 case ResourceLimitValueType::CurrentValue:
166 return MakeResult(resource_limit_object->GetCurrentValue(type));
167 case ResourceLimitValueType::LimitValue:
168 return MakeResult(resource_limit_object->GetLimitValue(type));
169 case ResourceLimitValueType::PeakValue:
170 return MakeResult(resource_limit_object->GetPeakValue(type));
171 default:
172 LOG_ERROR(Kernel_SVC, "Invalid resource value_type: '{}'", value_type);
173 return ResultInvalidEnumValue;
174 }
175}
176} // Anonymous namespace 144} // Anonymous namespace
177 145
178/// Set the process heap to a given Size. It can both extend and shrink the heap. 146/// Set the process heap to a given Size. It can both extend and shrink the heap.