acadia/zion/scheduler/process_manager.h

25 lines
505 B
C
Raw Normal View History

#pragma once
2023-06-26 15:46:03 -07:00
#include <glacier/container/vector.h>
2023-06-21 15:07:40 -07:00
#include <glacier/memory/ref_ptr.h>
#include "object/process.h"
class ProcessManager {
public:
// Initializes the ProcessManager
// and stores it in the global variable.
static void Init();
2023-06-21 15:07:40 -07:00
void InsertProcess(const glcr::RefPtr<Process>& proc);
Process& FromId(uint64_t id);
void DumpProcessStates();
private:
// TODO: This should be a hashmap.
2023-06-26 15:46:03 -07:00
glcr::Vector<glcr::RefPtr<Process>> proc_list_;
};
extern ProcessManager* gProcMan;