Always create threads in CREATED state.

Simplify the process class to have threads marked as runnable
separately.
This commit is contained in:
Drew Galbraith 2023-06-06 16:27:25 -07:00
parent ef8eb5d993
commit b0c2a6732b
4 changed files with 7 additions and 13 deletions

View file

@ -74,7 +74,7 @@ uint64_t ProcessSpawnElf(ZProcessSpawnElfReq* req) {
SharedPtr<Process> proc = MakeShared<Process>();
gProcMan->InsertProcess(proc);
uint64_t entry = LoadElfProgram(*proc, req->elf_base, req->elf_size);
proc->CreateThread(entry);
proc->CreateThread()->Start(entry, 0, 0);
return 0;
}