summaryrefslogtreecommitdiff
path: root/kernel/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/interrupts.c')
-rw-r--r--kernel/interrupts.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/interrupts.c b/kernel/interrupts.c
index 3ab0dd3..180658a 100644
--- a/kernel/interrupts.c
+++ b/kernel/interrupts.c
@@ -51,7 +51,10 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq)
{
// DO NOT WRITE INSIDE INTERRUPTS!! COZ IT ACQUIRES LOCK AND WE WILL DEADLOCK
// klog("int: %d on 0x%x",irq,apicID());
- if(irq==INTERRUPT_PIT_TIMER)asm_pit_tick();
+ if(irq==INTERRUPT_PIT_TIMER){
+ asm_pit_tick();
+// return esp; // tried to skip EOI
+ }
// mouse and kb
if(irq==INTERRUPT_KEYBOARD || irq==INTERRUPT_MOUSE){
@@ -60,7 +63,7 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq)
// TODO: mouse
// test ipi
- //apicIPI(15,0x81); // force cpu16 to autoschedule? just test
+ apicIPI(2,0x81); // force cpu16 to autoschedule? just test
//klog("0x60 in %d",in);
}
@@ -80,8 +83,7 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq)
}
// schedules on APIC timer 0x8C and IPI 0x81
- if(irq==INTERRUPT_PIT_TIMER || irq==INTERRUPT_IPI)esp=my_scheduler(esp,-1); // autoschedule
-
+ if(irq==INTERRUPT_APIC_TIMER || irq==INTERRUPT_IPI)esp=my_scheduler(esp,-1); // autoschedule
if(irq!=INTERRUPT_SYSCALL)apicEOI(); // ack all except software syscalls