[kernel] Keep other threads out of idle priority

Split out different constants for scheduler::idle_priority and
scheduler::max_priority, so that threads never fall to the same priority
level as the idle threads.
This commit is contained in:
Justin C. Miller
2023-02-18 14:17:57 -08:00
parent e250aaef30
commit 8817766469
5 changed files with 10 additions and 9 deletions

View File

@@ -171,9 +171,9 @@ thread::setup_kernel_stack()
}
thread *
thread::create_idle_thread(process &kernel, uint8_t pri, uintptr_t rsp0)
thread::create_idle_thread(process &kernel, uintptr_t rsp0)
{
thread *idle = new thread(kernel, pri, rsp0);
thread *idle = new thread(kernel, scheduler::idle_priority, rsp0);
idle->set_state(state::constant);
idle->set_state(state::ready);
return idle;