pm: hook up the new libnx apis

This commit is contained in:
Michael Scire 2022-03-22 10:21:47 -07:00
parent 0a81889967
commit f804793fdf
4 changed files with 11 additions and 16 deletions

View file

@ -29,7 +29,7 @@ namespace ams::pm::shell {
Result GetProcessEventInfo(ProcessEventInfo *out); Result GetProcessEventInfo(ProcessEventInfo *out);
Result GetApplicationProcessIdForShell(os::ProcessId *out); Result GetApplicationProcessIdForShell(os::ProcessId *out);
Result BoostSystemMemoryResourceLimit(u64 size); Result BoostSystemMemoryResourceLimit(u64 size);
Result EnableApplicationExtraThread(); Result BoostApplicationThreadResourceLimit();
Result EnableSystemExtraThread(); Result BoostSystemThreadResourceLimit();
} }

View file

@ -26,9 +26,7 @@ namespace ams::pm::dmnt {
} }
Result GetProgramId(ncm::ProgramId *out_program_id, os::ProcessId process_id) { Result GetProgramId(ncm::ProgramId *out_program_id, os::ProcessId process_id) {
/* TODO: return return pmdmntGetProgramId(reinterpret_cast<u64 *>(out_program_id), static_cast<u64>(process_id)); */ return pmdmntGetProgramId(reinterpret_cast<u64 *>(out_program_id), static_cast<u64>(process_id));
AMS_UNUSED(out_program_id, process_id);
AMS_ABORT("TODO");
} }
Result GetProcessId(os::ProcessId *out_process_id, const ncm::ProgramId program_id) { Result GetProcessId(os::ProcessId *out_process_id, const ncm::ProgramId program_id) {

View file

@ -29,15 +29,13 @@ namespace ams::pm::info {
} }
Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out) { Result GetAppletCurrentResourceLimitValues(pm::ResourceLimitValues *out) {
/* TODO: return pminfoGetAppletCurrentResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)); */ static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues));
AMS_UNUSED(out); return pminfoGetAppletCurrentResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out));
AMS_ABORT("TODO");
} }
Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out) { Result GetAppletPeakResourceLimitValues(pm::ResourceLimitValues *out) {
/* TODO: return pminfoGetAppletPeakResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out)); */ static_assert(sizeof(pm::ResourceLimitValues) == sizeof(::PmResourceLimitValues));
AMS_UNUSED(out); return pminfoGetAppletPeakResourceLimitValues(reinterpret_cast<PmResourceLimitValues *>(out));
AMS_ABORT("TODO");
} }
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) {

View file

@ -50,14 +50,13 @@ namespace ams::pm::shell {
return ::pmshellBoostSystemMemoryResourceLimit(size); return ::pmshellBoostSystemMemoryResourceLimit(size);
} }
Result EnableApplicationExtraThread() { Result BoostApplicationThreadResourceLimit() {
return ::pmshellEnableApplicationExtraThread(); return ::pmshellBoostApplicationThreadResourceLimit();
} }
#endif #endif
Result EnableSystemExtraThread() { Result BoostSystemThreadResourceLimit() {
/* TODO: return ::pmshellEnableSystemExtraThread(); */ return ::pmshellBoostSystemThreadResourceLimit();
AMS_ABORT("TODO");
} }
} }