mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
pm: adjust resource limit function names
This commit is contained in:
parent
7f4450f930
commit
c44da84869
11 changed files with 29 additions and 29 deletions
|
@ -27,7 +27,7 @@
|
||||||
AMS_SF_METHOD_INFO(C, H, 4, Result, GetApplicationProcessId, (sf::Out<os::ProcessId> out), (out)) \
|
AMS_SF_METHOD_INFO(C, H, 4, Result, GetApplicationProcessId, (sf::Out<os::ProcessId> out), (out)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 5, Result, HookToCreateApplicationProcess, (sf::OutCopyHandle out_hook), (out_hook)) \
|
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, 6, Result, ClearHook, (u32 which), (which), hos::Version_6_0_0) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 7, Result, GetProgramId, (sf::Out<ncm::ProgramId> out, os::ProcessId process_id), (out, process_id)) \
|
AMS_SF_METHOD_INFO(C, H, 7, Result, GetProgramId, (sf::Out<ncm::ProgramId> out, os::ProcessId process_id), (out, process_id)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessInfo, (sf::OutCopyHandle out_process_handle, sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status, os::ProcessId process_id), (out_process_handle, out_loc, out_status, process_id)) \
|
AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessInfo, (sf::OutCopyHandle out_process_handle, sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> 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<s64> out_cur_val, sf::Out<s64> out_lim_val, u32 group, u32 resource), (out_cur_val, out_lim_val, group, resource))
|
AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereGetCurrentLimitInfo, (sf::Out<s64> out_cur_val, sf::Out<s64> out_lim_val, u32 group, u32 resource), (out_cur_val, out_lim_val, group, resource))
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
#define AMS_PM_I_INFORMATION_INTERFACE_INTERFACE_INFO(C, H) \
|
#define AMS_PM_I_INFORMATION_INTERFACE_INTERFACE_INFO(C, H) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 0, Result, GetProgramId, (sf::Out<ncm::ProgramId> out, os::ProcessId process_id), (out, process_id)) \
|
AMS_SF_METHOD_INFO(C, H, 0, Result, GetProgramId, (sf::Out<ncm::ProgramId> out, os::ProcessId process_id), (out, process_id)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 1, Result, GetAppletCurrentResourceLimitValues, (sf::Out<pm::ResourceLimitValues> out), (out)) \
|
AMS_SF_METHOD_INFO(C, H, 1, Result, GetAppletResourceLimitCurrentValue, (sf::Out<pm::ResourceLimitValue> out), (out)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 2, Result, GetAppletPeakResourceLimitValues, (sf::Out<pm::ResourceLimitValues> out), (out)) \
|
AMS_SF_METHOD_INFO(C, H, 2, Result, GetAppletResourceLimitPeakValue, (sf::Out<pm::ResourceLimitValue> out), (out)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessId, (sf::Out<os::ProcessId> out, ncm::ProgramId program_id), (out, program_id)) \
|
AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessId, (sf::Out<os::ProcessId> out, ncm::ProgramId program_id), (out, program_id)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereHasLaunchedBootProgram, (sf::Out<bool> out, ncm::ProgramId program_id), (out, program_id)) \
|
AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereHasLaunchedBootProgram, (sf::Out<bool> out, ncm::ProgramId program_id), (out, program_id)) \
|
||||||
AMS_SF_METHOD_INFO(C, H, 65002, Result, AtmosphereGetProcessInfo, (sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status, os::ProcessId process_id), (out_loc, out_status, process_id))
|
AMS_SF_METHOD_INFO(C, H, 65002, Result, AtmosphereGetProcessInfo, (sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status, os::ProcessId process_id), (out_loc, out_status, process_id))
|
||||||
|
|
|
@ -29,8 +29,8 @@ namespace ams::pm::info {
|
||||||
Result GetProcessId(os::ProcessId *out_process_id, ncm::ProgramId program_id);
|
Result GetProcessId(os::ProcessId *out_process_id, ncm::ProgramId program_id);
|
||||||
Result HasLaunchedBootProgram(bool *out, ncm::ProgramId program_id);
|
Result HasLaunchedBootProgram(bool *out, ncm::ProgramId program_id);
|
||||||
|
|
||||||
Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out);
|
Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out);
|
||||||
Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out);
|
Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out);
|
||||||
|
|
||||||
Result GetProcessInfo(ncm::ProgramLocation *out_loc, cfg::OverrideStatus *out_status, os::ProcessId process_id);
|
Result GetProcessInfo(ncm::ProgramLocation *out_loc, cfg::OverrideStatus *out_status, os::ProcessId process_id);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace ams::pm {
|
||||||
LaunchFlagsDeprecated_SignalOnStart = (1 << 5),
|
LaunchFlagsDeprecated_SignalOnStart = (1 << 5),
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ResourceLimitValues {
|
struct ResourceLimitValue {
|
||||||
u64 physical_memory;
|
u64 physical_memory;
|
||||||
u32 thread_count;
|
u32 thread_count;
|
||||||
u32 event_count;
|
u32 event_count;
|
||||||
|
|
|
@ -28,13 +28,13 @@ namespace ams::pm::info {
|
||||||
R_RETURN(pminfoAtmosphereGetProcessId(reinterpret_cast<u64 *>(out_process_id), static_cast<u64>(program_id)));
|
R_RETURN(pminfoAtmosphereGetProcessId(reinterpret_cast<u64 *>(out_process_id), static_cast<u64>(program_id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out) {
|
Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out) {
|
||||||
static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues));
|
static_assert(sizeof(pm::ResourceLimitValue) == sizeof(::PmResourceLimitValues));
|
||||||
R_RETURN(pminfoGetAppletCurrentResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)));
|
R_RETURN(pminfoGetAppletCurrentResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out) {
|
Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out) {
|
||||||
static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues));
|
static_assert(sizeof(pm::ResourceLimitValue) == sizeof(::PmResourceLimitValues));
|
||||||
R_RETURN(pminfoGetAppletPeakResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)));
|
R_RETURN(pminfoGetAppletPeakResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -719,12 +719,12 @@ namespace ams::pm::impl {
|
||||||
R_RETURN(resource::BoostSystemThreadResourceLimit());
|
R_RETURN(resource::BoostSystemThreadResourceLimit());
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out) {
|
Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out) {
|
||||||
R_RETURN(resource::GetCurrentResourceLimitValues(ResourceLimitGroup_Applet, out));
|
R_RETURN(resource::GetResourceLimitCurrentValue(ResourceLimitGroup_Applet, out));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out) {
|
Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out) {
|
||||||
R_RETURN(resource::GetPeakResourceLimitValues(ResourceLimitGroup_Applet, out));
|
R_RETURN(resource::GetResourceLimitPeakValue(ResourceLimitGroup_Applet, out));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result AtmosphereGetCurrentLimitInfo(s64 *out_cur_val, s64 *out_lim_val, u32 group, u32 resource) {
|
Result AtmosphereGetCurrentLimitInfo(s64 *out_cur_val, s64 *out_lim_val, u32 group, u32 resource) {
|
||||||
|
|
|
@ -52,8 +52,8 @@ namespace ams::pm::impl {
|
||||||
Result BoostSystemMemoryResourceLimit(u64 boost_size);
|
Result BoostSystemMemoryResourceLimit(u64 boost_size);
|
||||||
Result BoostApplicationThreadResourceLimit();
|
Result BoostApplicationThreadResourceLimit();
|
||||||
Result BoostSystemThreadResourceLimit();
|
Result BoostSystemThreadResourceLimit();
|
||||||
Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out);
|
Result GetAppletResourceLimitCurrentValue(pm::ResourceLimitValue *out);
|
||||||
Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out);
|
Result GetAppletResourceLimitPeakValue(pm::ResourceLimitValue *out);
|
||||||
Result AtmosphereGetCurrentLimitInfo(s64 *out_cur_val, s64 *out_lim_val, u32 group, u32 resource);
|
Result AtmosphereGetCurrentLimitInfo(s64 *out_cur_val, s64 *out_lim_val, u32 group, u32 resource);
|
||||||
Result BoostSystemMemoryResourceLimitForMitm(u64 boost_size);
|
Result BoostSystemMemoryResourceLimitForMitm(u64 boost_size);
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace ams::pm::resource {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<auto GetResourceLimitValueImpl>
|
template<auto GetResourceLimitValueImpl>
|
||||||
ALWAYS_INLINE Result GetResourceLimitValuesImpl(ResourceLimitGroup group, pm::ResourceLimitValues *out) {
|
ALWAYS_INLINE Result GetResourceLimitValuesImpl(ResourceLimitGroup group, pm::ResourceLimitValue *out) {
|
||||||
/* Sanity check group. */
|
/* Sanity check group. */
|
||||||
AMS_ABORT_UNLESS(group < ResourceLimitGroup_Count);
|
AMS_ABORT_UNLESS(group < ResourceLimitGroup_Count);
|
||||||
|
|
||||||
|
@ -451,15 +451,15 @@ namespace ams::pm::resource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetCurrentResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out) {
|
Result GetResourceLimitCurrentValue(ResourceLimitGroup group, pm::ResourceLimitValue *out) {
|
||||||
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitCurrentValue>(group, out));
|
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitCurrentValue>(group, out));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetPeakResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out) {
|
Result GetResourceLimitPeakValue(ResourceLimitGroup group, pm::ResourceLimitValue *out) {
|
||||||
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitPeakValue>(group, out));
|
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitPeakValue>(group, out));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetLimitResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out) {
|
Result GetResourceLimitLimitValue(ResourceLimitGroup group, pm::ResourceLimitValue *out) {
|
||||||
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitLimitValue>(group, out));
|
R_RETURN(GetResourceLimitValuesImpl<::ams::svc::GetResourceLimitLimitValue>(group, out));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ namespace ams::pm::resource {
|
||||||
|
|
||||||
void WaitResourceAvailable(const ldr::ProgramInfo *info);
|
void WaitResourceAvailable(const ldr::ProgramInfo *info);
|
||||||
|
|
||||||
Result GetCurrentResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out);
|
Result GetResourceLimitCurrentValue(ResourceLimitGroup group, pm::ResourceLimitValue *out);
|
||||||
Result GetPeakResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out);
|
Result GetResourceLimitPeakValue(ResourceLimitGroup group, pm::ResourceLimitValue *out);
|
||||||
Result GetLimitResourceLimitValues(ResourceLimitGroup group, pm::ResourceLimitValues *out);
|
Result GetResourceLimitLimitValue(ResourceLimitGroup group, pm::ResourceLimitValue *out);
|
||||||
|
|
||||||
Result GetResourceLimitValues(s64 *out_cur, s64 *out_lim, ResourceLimitGroup group, svc::LimitableResource resource);
|
Result GetResourceLimitValues(s64 *out_cur, s64 *out_lim, ResourceLimitGroup group, svc::LimitableResource resource);
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,12 @@ namespace ams::pm {
|
||||||
R_RETURN(impl::GetProgramId(out.GetPointer(), process_id));
|
R_RETURN(impl::GetProgramId(out.GetPointer(), process_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result InformationService::GetAppletCurrentResourceLimitValues(sf::Out<pm::ResourceLimitValues> out) {
|
Result InformationService::GetAppletResourceLimitCurrentValue(sf::Out<pm::ResourceLimitValue> out) {
|
||||||
R_RETURN(impl::GetAppletCurrentResourceLimitValues(out.GetPointer()));
|
R_RETURN(impl::GetAppletResourceLimitCurrentValue(out.GetPointer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result InformationService::GetAppletPeakResourceLimitValues(sf::Out<pm::ResourceLimitValues> out) {
|
Result InformationService::GetAppletResourceLimitPeakValue(sf::Out<pm::ResourceLimitValue> out) {
|
||||||
R_RETURN(impl::GetAppletPeakResourceLimitValues(out.GetPointer()));
|
R_RETURN(impl::GetAppletResourceLimitPeakValue(out.GetPointer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Atmosphere extension commands. */
|
/* Atmosphere extension commands. */
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace ams::pm {
|
||||||
public:
|
public:
|
||||||
/* Actual command implementations. */
|
/* Actual command implementations. */
|
||||||
Result GetProgramId(sf::Out<ncm::ProgramId> out, os::ProcessId process_id);
|
Result GetProgramId(sf::Out<ncm::ProgramId> out, os::ProcessId process_id);
|
||||||
Result GetAppletCurrentResourceLimitValues(sf::Out<pm::ResourceLimitValues> out);
|
Result GetAppletResourceLimitCurrentValue(sf::Out<pm::ResourceLimitValue> out);
|
||||||
Result GetAppletPeakResourceLimitValues(sf::Out<pm::ResourceLimitValues> out);
|
Result GetAppletResourceLimitPeakValue(sf::Out<pm::ResourceLimitValue> out);
|
||||||
|
|
||||||
/* Atmosphere extension commands. */
|
/* Atmosphere extension commands. */
|
||||||
Result AtmosphereGetProcessId(sf::Out<os::ProcessId> out, ncm::ProgramId program_id);
|
Result AtmosphereGetProcessId(sf::Out<os::ProcessId> out, ncm::ProgramId program_id);
|
||||||
|
|
Loading…
Reference in a new issue