Move process be to RefCounted
This commit is contained in:
parent
2e1357255c
commit
d358c1d672
6 changed files with 16 additions and 11 deletions
|
|
@ -13,13 +13,14 @@ static uint64_t gNextId = 1;
|
|||
|
||||
}
|
||||
|
||||
SharedPtr<Process> Process::RootProcess() {
|
||||
SharedPtr<Process> proc(new Process(0));
|
||||
RefPtr<Process> Process::RootProcess() {
|
||||
RefPtr<Process> proc = MakeRefCounted<Process>(0);
|
||||
proc->threads_.PushBack(Thread::RootThread(*proc));
|
||||
proc->next_thread_id_ = 1;
|
||||
|
||||
return proc;
|
||||
}
|
||||
RefPtr<Process> Process::Create() { return MakeRefCounted<Process>(); }
|
||||
|
||||
Process::Process() : id_(gNextId++), state_(RUNNING) {
|
||||
caps_.PushBack(new Capability(this, Capability::PROCESS, Z_INIT_PROC_SELF,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue