2018-05-03 04:10:05 -06:00
|
|
|
#include <switch.h>
|
2018-05-03 16:15:00 -06:00
|
|
|
#include <stratosphere.hpp>
|
2018-05-03 04:10:05 -06:00
|
|
|
#include "pm_process_track.hpp"
|
2018-05-03 23:58:25 -06:00
|
|
|
#include "pm_registration.hpp"
|
2018-05-03 04:10:05 -06:00
|
|
|
|
2018-05-03 16:15:00 -06:00
|
|
|
void ProcessTracking::MainLoop(void *arg) {
|
2018-05-03 23:58:25 -06:00
|
|
|
/* Make a new waitable manager. */
|
2018-06-15 00:47:07 -06:00
|
|
|
MultiThreadedWaitableManager *process_waiter = new MultiThreadedWaitableManager(1, U64_MAX);
|
2018-05-06 22:59:54 -06:00
|
|
|
process_waiter->add_waitable(Registration::GetProcessLaunchStartEvent());
|
2018-06-15 00:47:07 -06:00
|
|
|
Registration::SetProcessListManager(process_waiter);
|
2018-05-06 02:23:47 -06:00
|
|
|
|
2018-05-03 23:58:25 -06:00
|
|
|
/* Service processes. */
|
2018-05-06 22:59:54 -06:00
|
|
|
process_waiter->process();
|
2018-05-03 23:58:25 -06:00
|
|
|
|
|
|
|
delete process_waiter;
|
|
|
|
svcExitThread();
|
2018-05-03 04:10:05 -06:00
|
|
|
}
|