Kernel: Add Scheduler::is_initialized
This commit is contained in:
parent
8e9fb3766d
commit
cf1c8eb778
Notes:
sideshowbarker
2024-07-18 11:31:45 +09:00
Author: https://github.com/ccapitalK Commit: https://github.com/SerenityOS/serenity/commit/cf1c8eb7786 Pull-request: https://github.com/SerenityOS/serenity/pull/7130 Reviewed-by: https://github.com/Dexesttp Reviewed-by: https://github.com/IdanHo
2 changed files with 7 additions and 0 deletions
|
@ -570,6 +570,12 @@ void Scheduler::dump_scheduler_state()
|
|||
dump_thread_list();
|
||||
}
|
||||
|
||||
bool Scheduler::is_initialized()
|
||||
{
|
||||
// The scheduler is initalized iff the idle thread exists
|
||||
return Processor::idle_thread() != nullptr;
|
||||
}
|
||||
|
||||
void dump_thread_list()
|
||||
{
|
||||
dbgln("Scheduler thread list for processor {}:", Processor::id());
|
||||
|
|
|
@ -51,6 +51,7 @@ public:
|
|||
static bool dequeue_runnable_thread(Thread&, bool = false);
|
||||
static void queue_runnable_thread(Thread&);
|
||||
static void dump_scheduler_state();
|
||||
static bool is_initialized();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue