fix bug in handling the timer interrupt

=> sending EOI before task switching
This commit is contained in:
Stefan Lankes 2011-07-30 22:47:27 +02:00
parent 5290cd0002
commit 0410594ae8
2 changed files with 8 additions and 6 deletions

View file

@ -253,7 +253,7 @@ void irq_handler(struct state *s)
*/
if (apic_is_enabled() || s->int_no >= 123) {
apic_eoi();
return;
goto leave_handler;
}
#ifndef CONFIG_ROCKCREEK
@ -273,4 +273,9 @@ void irq_handler(struct state *s)
#else
kprintf("Upps, RockCreek uses IRQs below 123!\n");
#endif
leave_handler:
// timer interrupt?
if ((s->int_no == 32) || (s->int_no == 123))
scheduler(); // switch to a new task
}

View file

@ -69,15 +69,12 @@ static void timer_handler(struct state *s)
#endif
/*
* Every TIMER_FREQ clocks (approximately 1 second), we will
* Every TIMER_FREQ clocks (approximately 1 second), we will
* display a message on the screen
*/
*/
/*if (timer_ticks % TIMER_FREQ == 0) {
vga_puts("One second has passed\n");
}*/
// switch to a new task
scheduler();
}
/*