summaryrefslogtreecommitdiff
path: root/kernel/drivers/pit.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-09 14:08:28 +0100
committerAnton Kling <anton@kling.gg>2024-02-09 14:08:28 +0100
commita8ffc46136eb16adc87fb520c724467d1295a854 (patch)
tree2d1758a4e3c5b6ef8430c5a6b1aca7249ef7a56d /kernel/drivers/pit.c
parent581ac7e072633f68deed5c5d343603c053895907 (diff)
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
Diffstat (limited to 'kernel/drivers/pit.c')
-rw-r--r--kernel/drivers/pit.c10
1 files changed, 1 insertions, 9 deletions
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) {