2018-05-03 12:10:05 +02:00
|
|
|
#include <switch.h>
|
2018-05-04 00:15:00 +02:00
|
|
|
#include <stratosphere.hpp>
|
2018-05-03 12:10:05 +02:00
|
|
|
#include "pm_process_track.hpp"
|
2018-05-04 07:58:25 +02:00
|
|
|
#include "pm_registration.hpp"
|
2018-05-03 12:10:05 +02:00
|
|
|
|
2018-05-04 00:15:00 +02:00
|
|
|
void ProcessTracking::MainLoop(void *arg) {
|
2018-05-04 07:58:25 +02:00
|
|
|
/* Make a new waitable manager. */
|
|
|
|
WaitableManager *process_waiter = new WaitableManager(U64_MAX);
|
|
|
|
process_waiter->add_waitable(Registration::GetProcessLaunchStartEvent());
|
|
|
|
process_waiter->add_waitable(Registration::GetProcessList());
|
2018-05-03 12:10:05 +02:00
|
|
|
|
2018-05-04 07:58:25 +02:00
|
|
|
/* Service processes. */
|
|
|
|
process_waiter->process();
|
|
|
|
|
|
|
|
delete process_waiter;
|
|
|
|
svcExitThread();
|
2018-05-03 12:10:05 +02:00
|
|
|
}
|