Move scheduler to new global class format.

This commit is contained in:
Drew Galbraith 2023-05-29 23:48:32 -07:00
parent 7fe6c24aa5
commit de49dcc01a
7 changed files with 105 additions and 134 deletions

View file

@ -31,7 +31,7 @@ Process::Process(uint64_t elf_ptr) : id_(gNextId++), state_(RUNNING) {
void Process::CreateThread(uint64_t elf_ptr) {
Thread* thread = new Thread(this, next_thread_id_++, elf_ptr);
threads_.PushBack(thread);
sched::EnqueueThread(thread);
gScheduler->Enqueue(thread);
}
SharedPtr<Thread> Process::GetThread(uint64_t tid) {