From 44809d30cb9c084f61d99b790dda9160c7ed9032 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 17 Oct 2023 11:10:09 -0700 Subject: [PATCH] pm: adjust resource limit function names --- .../stratosphere/pm/impl/pm_debug_monitor_interface.hpp | 2 +- .../stratosphere/pm/impl/pm_information_interface.hpp | 4 ++-- libstratosphere/include/stratosphere/pm/pm_info_api.hpp | 4 ++-- libstratosphere/include/stratosphere/pm/pm_types.hpp | 2 +- libstratosphere/source/pm/pm_info_api.cpp | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp index f9e063ba..7c9676f8 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp +++ b/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp @@ -27,7 +27,7 @@ AMS_SF_METHOD_INFO(C, H, 4, Result, GetApplicationProcessId, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 5, Result, HookToCreateApplicationProcess, (sf::OutCopyHandle out_hook), (out_hook)) \ AMS_SF_METHOD_INFO(C, H, 6, Result, ClearHook, (u32 which), (which), hos::Version_6_0_0) \ - AMS_SF_METHOD_INFO(C, H, 7, Result, GetProgramId, (sf::Out out, os::ProcessId process_id), (out, process_id)) \ + AMS_SF_METHOD_INFO(C, H, 7, Result, GetProgramId, (sf::Out out, os::ProcessId process_id), (out, process_id)) \ AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessInfo, (sf::OutCopyHandle out_process_handle, sf::Out out_loc, sf::Out out_status, os::ProcessId process_id), (out_process_handle, out_loc, out_status, process_id)) \ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereGetCurrentLimitInfo, (sf::Out out_cur_val, sf::Out out_lim_val, u32 group, u32 resource), (out_cur_val, out_lim_val, group, resource)) diff --git a/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp index 35f5d708..6eeda321 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp +++ b/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp @@ -21,8 +21,8 @@ #define AMS_PM_I_INFORMATION_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetProgramId, (sf::Out out, os::ProcessId process_id), (out, process_id)) \ - AMS_SF_METHOD_INFO(C, H, 1, Result, GetAppletCurrentResourceLimitValues, (sf::Out out), (out)) \ - AMS_SF_METHOD_INFO(C, H, 2, Result, GetAppletPeakResourceLimitValues, (sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 1, Result, GetAppletResourceLimitCurrentValue, (sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 2, Result, GetAppletResourceLimitPeakValue, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessId, (sf::Out out, ncm::ProgramId program_id), (out, program_id)) \ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereHasLaunchedBootProgram, (sf::Out out, ncm::ProgramId program_id), (out, program_id)) \ AMS_SF_METHOD_INFO(C, H, 65002, Result, AtmosphereGetProcessInfo, (sf::Out out_loc, sf::Out out_status, os::ProcessId process_id), (out_loc, out_status, process_id)) diff --git a/libstratosphere/include/stratosphere/pm/pm_info_api.hpp b/libstratosphere/include/stratosphere/pm/pm_info_api.hpp index c771eb33..484c4fa7 100644 --- a/libstratosphere/include/stratosphere/pm/pm_info_api.hpp +++ b/libstratosphere/include/stratosphere/pm/pm_info_api.hpp @@ -29,8 +29,8 @@ namespace ams::pm::info { Result GetProcessId(os::ProcessId *out_process_id, ncm::ProgramId program_id); Result HasLaunchedBootProgram(bool *out, ncm::ProgramId program_id); - Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out); - Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out); + Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out); + Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out); Result GetProcessInfo(ncm::ProgramLocation *out_loc, cfg::OverrideStatus *out_status, os::ProcessId process_id); diff --git a/libstratosphere/include/stratosphere/pm/pm_types.hpp b/libstratosphere/include/stratosphere/pm/pm_types.hpp index 9266302f..0fb6e3c8 100644 --- a/libstratosphere/include/stratosphere/pm/pm_types.hpp +++ b/libstratosphere/include/stratosphere/pm/pm_types.hpp @@ -52,7 +52,7 @@ namespace ams::pm { LaunchFlagsDeprecated_SignalOnStart = (1 << 5), }; - struct ResourceLimitValues { + struct ResourceLimitValue { u64 physical_memory; u32 thread_count; u32 event_count; diff --git a/libstratosphere/source/pm/pm_info_api.cpp b/libstratosphere/source/pm/pm_info_api.cpp index 182c09c8..9fdf4a86 100644 --- a/libstratosphere/source/pm/pm_info_api.cpp +++ b/libstratosphere/source/pm/pm_info_api.cpp @@ -28,13 +28,13 @@ namespace ams::pm::info { R_RETURN(pminfoAtmosphereGetProcessId(reinterpret_cast(out_process_id), static_cast(program_id))); } - Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out) { - static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues)); + Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out) { + static_assert(sizeof(pm::ResourceLimitValue) == sizeof(::PmResourceLimitValues)); R_RETURN(pminfoGetAppletCurrentResourceLimitValues(reinterpret_cast(out))); } - Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out) { - static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues)); + Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out) { + static_assert(sizeof(pm::ResourceLimitValue) == sizeof(::PmResourceLimitValues)); R_RETURN(pminfoGetAppletPeakResourceLimitValues(reinterpret_cast(out))); }