sched: simplify entry-exit path between processes

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-22 01:09:27 -04:00
commit 11bedfe3a8
7 changed files with 24 additions and 20 deletions

View file

@ -5,6 +5,7 @@
#include <kernel/sched.h>
#include <drivers/apic.h>
#include <arch/msr.h>
#include <arch/proc.h>
#include <stdint.h>
@ -73,7 +74,9 @@ uint8_t lapic_idno()
static void timer_handler()
{
extern void schedule(void);
struct thread *cur = get_cur_thread();
sched_save_state(cur);
sched_add_thread(cur);
lapic_eoi();
schedule();
}