diff options
Diffstat (limited to 'kernel/interrupts.c')
| -rw-r--r-- | kernel/interrupts.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/kernel/interrupts.c b/kernel/interrupts.c index 6e9d943..59d20c1 100644 --- a/kernel/interrupts.c +++ b/kernel/interrupts.c @@ -50,13 +50,7 @@ static void int_install_ir(int irq, uint16_t flags, uint16_t sel, void *addr) */ 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(); -// asm_pit_sleep_40ms(); -// return esp; // tried to skip EOI - } + if(irq==INTERRUPT_PIT_TIMER)asm_pit_tick(); // mouse and kb if(irq==INTERRUPT_KEYBOARD || irq==INTERRUPT_MOUSE){ @@ -81,11 +75,11 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq) // klog("syscall: %d (ebx=0x%08X,ecx=0x%08X,edx=0x%08X)",eax,ebx,ecx,edx); task_syscall(eax,ebx,ecx,edx); - esp=my_scheduler(esp,2); // force scheduling of pid=2 (kernel worker) + esp=scheduler_run(esp,2); // force scheduling of pid=2 (kernel worker) } // schedules on APIC timer 0x8C and IPI 0x81 - if(irq==INTERRUPT_APIC_TIMER || irq==INTERRUPT_IPI)esp=my_scheduler(esp,-1); // autoschedule + if(irq==INTERRUPT_APIC_TIMER || irq==INTERRUPT_IPI)esp=scheduler_run(esp,-1); // autoschedule if(irq!=INTERRUPT_SYSCALL)apic_eoi(); // ack all except software syscalls |
