summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.cpp
diff options
context:
space:
mode:
authorSahan Fernando <sahan.h.fernando@gmail.com>2021-06-12 23:32:56 +1000
committerAndreas Kling <kling@serenityos.org>2021-06-25 19:26:30 +0200
commitcf1c8eb77862b9ef489619c73d16ace92b0aedf9 (patch)
tree89f52b318ae179eb71d2f1f9cd9a79c39592ef69 /Kernel/Scheduler.cpp
parent8e9fb3766d5d0f7f5d962004e9ad722e7be3f0af (diff)
downloadserenity-cf1c8eb77862b9ef489619c73d16ace92b0aedf9.zip
Kernel: Add Scheduler::is_initialized
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r--Kernel/Scheduler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index 5ce6449381..b98e8308d3 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -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());