mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -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;
|
||||
|
||||
@@ -168,9 +168,8 @@ public:
|
||||
|
||||
/// Create the kernel idle thread
|
||||
/// \arg kernel The process object that owns kernel tasks
|
||||
/// \arg pri The idle thread priority value
|
||||
/// \arg rsp The existing stack for the idle thread
|
||||
static thread * create_idle_thread(process &kernel, uint8_t pri, uintptr_t rsp);
|
||||
static thread * create_idle_thread(process &kernel, uintptr_t rsp);
|
||||
|
||||
protected:
|
||||
/// Don't delete a thread on no handles, the scheduler takes
|
||||
|
||||
Reference in New Issue
Block a user