mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 21:24:11 -04:00
meso: skeleton libmesosphere in prep for kernelldr dev
This commit is contained in:
parent
0b0fdc5c58
commit
36c47a0014
22 changed files with 732 additions and 13 deletions
|
@ -19,13 +19,13 @@ namespace ams::pm::bm {
|
|||
|
||||
/* Boot Mode API. */
|
||||
/* Both functions should be weakly linked, so that they can be overridden by ams::boot2 as needed. */
|
||||
BootMode WEAK GetBootMode() {
|
||||
BootMode WEAK_SYMBOL GetBootMode() {
|
||||
PmBootMode boot_mode = PmBootMode_Normal;
|
||||
R_ASSERT(pmbmGetBootMode(&boot_mode));
|
||||
return static_cast<BootMode>(boot_mode);
|
||||
}
|
||||
|
||||
void WEAK SetMaintenanceBoot() {
|
||||
void WEAK_SYMBOL SetMaintenanceBoot() {
|
||||
R_ASSERT(pmbmSetMaintenanceBoot());
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace ams::pm::info {
|
|||
return pminfoAtmosphereGetProcessInfo(reinterpret_cast<NcmProgramLocation *>(out_loc), reinterpret_cast<CfgOverrideStatus *>(out_status), static_cast<u64>(process_id));
|
||||
}
|
||||
|
||||
Result WEAK HasLaunchedProgram(bool *out, ncm::ProgramId program_id) {
|
||||
Result WEAK_SYMBOL HasLaunchedProgram(bool *out, ncm::ProgramId program_id) {
|
||||
std::scoped_lock lk(g_info_lock);
|
||||
|
||||
if (g_cached_launched_programs.find(static_cast<u64>(program_id)) != g_cached_launched_programs.end()) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
namespace ams::pm::shell {
|
||||
|
||||
/* Shell API. */
|
||||
Result WEAK LaunchProgram(os::ProcessId *out_process_id, const ncm::ProgramLocation &loc, u32 launch_flags) {
|
||||
Result WEAK_SYMBOL LaunchProgram(os::ProcessId *out_process_id, const ncm::ProgramLocation &loc, u32 launch_flags) {
|
||||
static_assert(sizeof(ncm::ProgramLocation) == sizeof(NcmProgramLocation));
|
||||
static_assert(alignof(ncm::ProgramLocation) == alignof(NcmProgramLocation));
|
||||
return pmshellLaunchProgram(launch_flags, reinterpret_cast<const NcmProgramLocation *>(&loc), reinterpret_cast<u64 *>(out_process_id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue