mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-03 09:02:30 +00:00
6d6ecb503a
NOTE: Debugging logs have been left in, and will be cleaned up once PM is working.
28 lines
No EOL
745 B
C++
28 lines
No EOL
745 B
C++
#include <switch.h>
|
|
#include <stratosphere.hpp>
|
|
#include "pm_process_track.hpp"
|
|
#include "pm_registration.hpp"
|
|
#include "pm_debug.hpp"
|
|
|
|
void ProcessTracking::MainLoop(void *arg) {
|
|
/* Make a new waitable manager. */
|
|
WaitableManager *process_waiter = new WaitableManager(1000);
|
|
process_waiter->add_waitable(Registration::GetProcessList());
|
|
|
|
static unsigned int i = 0;
|
|
/* Service processes. */
|
|
while (true) {
|
|
process_waiter->process_until_timeout();
|
|
|
|
i++;
|
|
if (Registration::TryWaitProcessLaunchStartEvent()) {
|
|
Registration::HandleProcessLaunch();
|
|
}
|
|
if (i > 1000000) {
|
|
Reboot();
|
|
}
|
|
}
|
|
|
|
delete process_waiter;
|
|
svcExitThread();
|
|
} |