diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-02 09:44:28 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:54 +0200 |
commit | eae107d0e9764ac2773a20e744c17201cfe2f814 (patch) | |
tree | 2e251c148dd8e6489d4a0626ad0d9e448ee63597 /src/core/hle | |
parent | hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. (diff) | |
download | yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.gz yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.bz2 yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.lz yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.xz yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.tar.zst yuzu-eae107d0e9764ac2773a20e744c17201cfe2f814.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 32 |
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. |