From a8ffc46136eb16adc87fb520c724467d1295a854 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Fri, 9 Feb 2024 14:08:28 +0100 Subject: Kernel/Interrupts: Restructure how interrupts are handeled in the kernel Now all interrupts go through a common stub which will make certain signal handlers easier to implement --- kernel/drivers/pit.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'kernel/drivers/pit.c') diff --git a/kernel/drivers/pit.c b/kernel/drivers/pit.c index 8f9c35c..509f3f5 100644 --- a/kernel/drivers/pit.c +++ b/kernel/drivers/pit.c @@ -41,15 +41,7 @@ void set_pit_count(u16 hertz) { outb(PIT_IO_CHANNEL_0, (divisor & 0xFF00) >> 8); } -__attribute__((interrupt)) void int_clock(registers_t *regs) { - process_t *p = get_current_task(); - if (p) { - // FIXME: For some reason eflags is the esp? I have read the - // manual multilpe times and still can't figure out why. - if (regs->eflags <= 0x90000000 && regs->eflags) { - p->useresp = regs->eflags; - } - } +void int_clock(reg_t regs) { outb(0x20, 0x20); pit_counter++; if (pit_counter >= hertz / 1000) { -- cgit v1.2.3