ProcessManager: Stub ProcessTracking code.

This commit is contained in:
Michael Scire 2018-05-03 04:10:05 -06:00
parent 0459bcee74
commit 3d2c3e1fe1
3 changed files with 30 additions and 0 deletions

View file

@ -6,6 +6,9 @@
#include <switch.h>
#include <stratosphere.hpp>
#include "pm_boot_mode.hpp"
#include "pm_process_track.hpp"
extern "C" {
extern u32 __start__;
@ -82,10 +85,14 @@ int main(int argc, char **argv)
{
consoleDebugInit(debugDevice_SVC);
/* Initialize and spawn the Process Tracking thread. */
ProcessTracking::Initialize();
/* TODO: What's a good timeout value to use here? */
WaitableManager *server_manager = new WaitableManager(U64_MAX);
/* TODO: Create services. */
server_manager->add_waitable(new ServiceServer<BootModeService>("pm:bm", 4));
/* Loop forever, servicing our services. */
server_manager->process();

View file

@ -0,0 +1,15 @@
#include <switch.h>
#include "pm_process_track.hpp"
void ProcessTracking::Initialize() {
/* TODO: Setup ResourceLimit values, create MainLoop thread. */
}
void ProcessTracking::MainLoop() {
/* TODO */
while (true) {
/* PM, as a sysmodule, is basically just a while loop. */
/* This is what while loop. */
}
}

View file

@ -0,0 +1,8 @@
#pragma once
#include <switch.h>
class ProcessTracking {
public:
static void Initialize();
static void MainLoop();
};