mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
Make PM Compile. Note: Currently broken.
This commit is contained in:
parent
c2d9ac8f5c
commit
4d36697080
8 changed files with 24 additions and 22 deletions
|
@ -46,7 +46,7 @@ class IEvent : public IWaitable {
|
|||
return this->callback(this->arg, this->handles.data(), this->handles.size(), timeout);
|
||||
}
|
||||
|
||||
static Result PanicCallback(Handle *handles, size_t num_handles, u64 timeout) {
|
||||
static Result PanicCallback(void *arg, Handle *handles, size_t num_handles, u64 timeout) {
|
||||
/* TODO: Panic. */
|
||||
return 0xCAFE;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,10 @@ class BootModeService final : public IServiceObject {
|
|||
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
|
||||
Result handle_deferred() override;
|
||||
|
||||
BootModeService *clone() override {
|
||||
return new BootModeService(*this);
|
||||
}
|
||||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result, bool> get_boot_mode();
|
||||
|
|
|
@ -32,6 +32,10 @@ class DebugMonitorService final : public IServiceObject {
|
|||
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
|
||||
Result handle_deferred() override;
|
||||
|
||||
DebugMonitorService *clone() override {
|
||||
return new DebugMonitorService(*this);
|
||||
}
|
||||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result, u32> get_unknown_stub(u64 unknown, OutBuffer<u8> out_unknown);
|
||||
|
|
|
@ -12,6 +12,10 @@ class InformationService final : public IServiceObject {
|
|||
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
|
||||
Result handle_deferred() override;
|
||||
|
||||
InformationService *clone() override {
|
||||
return new InformationService(*this);
|
||||
}
|
||||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result, u64> get_title_id(u64 pid);
|
||||
|
|
|
@ -52,21 +52,6 @@ class ProcessList final : public IWaitable {
|
|||
}
|
||||
|
||||
/* IWaitable */
|
||||
unsigned int get_num_waitables() override {
|
||||
return process_waiters.size();
|
||||
}
|
||||
|
||||
void get_waitables(IWaitable **dst) override {
|
||||
Lock();
|
||||
for (unsigned int i = 0; i < process_waiters.size(); i++) {
|
||||
dst[i] = process_waiters[i];
|
||||
}
|
||||
Unlock();
|
||||
}
|
||||
|
||||
void delete_child(IWaitable *child) override {
|
||||
/* TODO: Panic, because we should never be asked to delete a child. */
|
||||
}
|
||||
|
||||
Handle get_handle() override {
|
||||
/* TODO: Panic, because we don't have a handle. */
|
||||
|
|
|
@ -41,15 +41,15 @@ void Registration::AutoProcessListLock::Unlock() {
|
|||
}
|
||||
|
||||
void Registration::InitializeSystemResources() {
|
||||
g_process_event = new SystemEvent(&IEvent::PanicCallback);
|
||||
g_debug_title_event = new SystemEvent(&IEvent::PanicCallback);
|
||||
g_debug_application_event = new SystemEvent(&IEvent::PanicCallback);
|
||||
g_process_launch_start_event = new SystemEvent(&Registration::ProcessLaunchStartCallback);
|
||||
g_process_event = new SystemEvent(NULL, &IEvent::PanicCallback);
|
||||
g_debug_title_event = new SystemEvent(NULL, &IEvent::PanicCallback);
|
||||
g_debug_application_event = new SystemEvent(NULL, &IEvent::PanicCallback);
|
||||
g_process_launch_start_event = new SystemEvent(NULL, &Registration::ProcessLaunchStartCallback);
|
||||
|
||||
ResourceLimitUtils::InitializeLimits();
|
||||
}
|
||||
|
||||
Result Registration::ProcessLaunchStartCallback(Handle *handles, size_t num_handles, u64 timeout) {
|
||||
Result Registration::ProcessLaunchStartCallback(void *arg, Handle *handles, size_t num_handles, u64 timeout) {
|
||||
svcClearEvent(handles[0]);
|
||||
Registration::HandleProcessLaunch();
|
||||
return 0;
|
||||
|
|
|
@ -42,7 +42,7 @@ class Registration {
|
|||
|
||||
static void InitializeSystemResources();
|
||||
static IWaitable *GetProcessLaunchStartEvent();
|
||||
static Result ProcessLaunchStartCallback(Handle *handles, size_t num_handles, u64 timeout);
|
||||
static Result ProcessLaunchStartCallback(void *arg, Handle *handles, size_t num_handles, u64 timeout);
|
||||
|
||||
static IWaitable *GetProcessList();
|
||||
static void HandleSignaledProcess(Process *process);
|
||||
|
|
|
@ -35,6 +35,11 @@ class ShellService final : public IServiceObject {
|
|||
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
|
||||
Result handle_deferred() override;
|
||||
|
||||
ShellService *clone() override {
|
||||
return new ShellService(*this);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result, u64> launch_process(u64 launch_flags, Registration::TidSid tid_sid);
|
||||
|
|
Loading…
Reference in a new issue