Modularize interrupt handlers, split up scheduler and PIT interrupt handlers
This commit is contained in:
@ -16,8 +16,9 @@
|
||||
#include "std/string.h"
|
||||
#include "cpu/gdt.h"
|
||||
#include "intr/intr.h"
|
||||
#include "switch.h"
|
||||
#include "intr/pic.h"
|
||||
#include "vmm/vmm.h"
|
||||
#include "proc/switch.h"
|
||||
#include "elf.h"
|
||||
#include "errors.h"
|
||||
#include "kprintf.h"
|
||||
@ -252,10 +253,18 @@ void proc_killself(void) {
|
||||
proc_kill(proc);
|
||||
}
|
||||
|
||||
int proc_intr(IntrStackFrame *frame) {
|
||||
intr_pic_eoi();
|
||||
proc_sched(frame);
|
||||
return INTR_NOEOI;
|
||||
}
|
||||
|
||||
void proc_init(void) {
|
||||
spinlock_init(&PROCS.spinlock);
|
||||
PROCS.procs = NULL;
|
||||
|
||||
intr_attchhandler(&proc_intr, INTR_IRQBASE+0);
|
||||
|
||||
Proc *init = proc_spawnuser("base", "/bin/init");
|
||||
PROCS.current = init;
|
||||
proc_register(init);
|
||||
|
||||
Reference in New Issue
Block a user