summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-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 {
PeakValue,
};
-ResultVal<s64> RetrieveResourceLimitValue(Core::System& system, Handle resource_limit,
- u32 resource_type, ResourceLimitValueType value_type) {
- std::lock_guard lock{HLE::g_hle_lock};
- const auto type = static_cast<LimitableResource>(resource_type);
- if (!IsValidResourceType(type)) {
- LOG_ERROR(Kernel_SVC, "Invalid resource limit type: '{}'", resource_type);
- return ResultInvalidEnumValue;
- }
-
- const auto* const current_process = system.Kernel().CurrentProcess();
- ASSERT(current_process != nullptr);
-
- auto resource_limit_object =
- current_process->GetHandleTable().GetObject<KResourceLimit>(resource_limit);
- if (resource_limit_object.IsNull()) {
- LOG_ERROR(Kernel_SVC, "Handle to non-existent resource limit instance used. Handle={:08X}",
- resource_limit);
- return ResultInvalidHandle;
- }
-
- switch (value_type) {
- case ResourceLimitValueType::CurrentValue:
- return MakeResult(resource_limit_object->GetCurrentValue(type));
- case ResourceLimitValueType::LimitValue:
- return MakeResult(resource_limit_object->GetLimitValue(type));
- case ResourceLimitValueType::PeakValue:
- return MakeResult(resource_limit_object->GetPeakValue(type));
- default:
- LOG_ERROR(Kernel_SVC, "Invalid resource value_type: '{}'", value_type);
- return ResultInvalidEnumValue;
- }
-}
} // Anonymous namespace
/// Set the process heap to a given Size. It can both extend and shrink the heap.