mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
smp: fix race between cpu exposure and smp init
The SMP code exposes that a cpu woke up before it is properly initialized in sched_ap_entry(). Fix this by initializing it first, exposing it and then stopping the bootstrap thread.
This commit is contained in:
@@ -376,7 +376,6 @@ void sched_ap_entry() {
|
||||
timer_insert(current_cpu()->timer, ¤t_cpu()->schedtimerentry, reschedule_timer_dpc, NULL, QUANTUM_US, true);
|
||||
timer_insert(current_cpu()->timer, ¤t_cpu()->calendar_tick_timer_entry, sched_calendar_tick, NULL, 10000, true);
|
||||
timer_resume(current_cpu()->timer);
|
||||
sched_stop_current_thread();
|
||||
}
|
||||
|
||||
void sched_init() {
|
||||
|
||||
Reference in New Issue
Block a user