Move process be to RefCounted
This commit is contained in:
parent
2e1357255c
commit
d358c1d672
6 changed files with 16 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "lib/linked_list.h"
|
||||
#include "lib/shared_ptr.h"
|
||||
#include "lib/ref_ptr.h"
|
||||
#include "scheduler/process.h"
|
||||
|
||||
class ProcessManager {
|
||||
|
|
@ -10,14 +10,14 @@ class ProcessManager {
|
|||
// and stores it in the global variable.
|
||||
static void Init();
|
||||
|
||||
void InsertProcess(const SharedPtr<Process>& proc);
|
||||
void InsertProcess(const RefPtr<Process>& proc);
|
||||
Process& FromId(uint64_t id);
|
||||
|
||||
void DumpProcessStates();
|
||||
|
||||
private:
|
||||
// TODO: This should be a hashmap.
|
||||
LinkedList<SharedPtr<Process>> proc_list_;
|
||||
LinkedList<RefPtr<Process>> proc_list_;
|
||||
};
|
||||
|
||||
extern ProcessManager* gProcMan;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue