Modularize interrupt handlers, split up scheduler and PIT interrupt handlers

This commit is contained in:
2025-11-17 01:08:23 +01:00
parent f2b7c5da57
commit 77b5a4a153
6 changed files with 70 additions and 25 deletions

View File

@ -2,10 +2,14 @@
#define INTR_INTR_H_
#include <stdint.h>
#include <stdbool.h>
#include "compiler/attr.h"
#define INTR_IRQBASE 0x20
#define INTR_OK 1
#define INTR_NOEOI 2
typedef struct {
uint64_t r15;
uint64_t r14;
@ -34,7 +38,8 @@ typedef struct {
uint64_t ss;
} PACKED IntrStackFrame;
void intr_attchhandler(void (*fn)(void), int irq);
void intr_attchhandler(int (*fn)(IntrStackFrame *frame), int irq);
int32_t intr_dttchhandler(int irq);
void intr_disable(void);
void intr_enable(void);
void intr_init(void);