summaryrefslogtreecommitdiff
path: root/kernel/interrupts.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-12 02:10:11 +0200
committerMiguel <m.i@gmx.at>2018-09-12 02:10:11 +0200
commita3ee159ebfd2d088432e386e8809840784f697e7 (patch)
tree9ecfc506bb65ec982aae47f161afa1777359d3f7 /kernel/interrupts.c
parentc9351caacd49c8442cc586f9e53a2dcc49a004aa (diff)
working on smp scheduler
Diffstat (limited to 'kernel/interrupts.c')
-rw-r--r--kernel/interrupts.c12
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