summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.h
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-07-06 07:27:22 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-06 17:07:44 +0200
commitbc107d0b3311677de7bc084cbb75c21b166c8ad5 (patch)
tree586d1cfa189d72309f978122e15d112539feef61 /Kernel/Scheduler.h
parentdec27e5e6fad25fedd9203087b8107242369dd2b (diff)
downloadserenity-bc107d0b3311677de7bc084cbb75c21b166c8ad5.zip
Kernel: Add SMP IPI support
We can now properly initialize all processors without crashing by sending SMP IPI messages to synchronize memory between processors. We now initialize the APs once we have the scheduler running. This is so that we can process IPI messages from the other cores. Also rework interrupt handling a bit so that it's more of a 1:1 mapping. We need to allocate non-sharable interrupts for IPIs. This also fixes the occasional hang/crash because all CPUs now synchronize memory with each other.
Diffstat (limited to 'Kernel/Scheduler.h')
-rw-r--r--Kernel/Scheduler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Scheduler.h b/Kernel/Scheduler.h
index 5ffb57d201..4b5588fc93 100644
--- a/Kernel/Scheduler.h
+++ b/Kernel/Scheduler.h
@@ -51,7 +51,9 @@ extern RecursiveSpinLock g_scheduler_lock;
class Scheduler {
public:
- static void initialize(u32 cpu);
+ static void initialize();
+ static Thread* create_ap_idle_thread(u32 cpu);
+ static void set_idle_thread(Thread* idle_thread);
static void timer_tick(const RegisterState&);
[[noreturn]] static void start();
static bool pick_next();