sched: simplify entry-exit path between processes
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
308ba36aab
commit
11bedfe3a8
7 changed files with 24 additions and 20 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue