mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: x86-64 idt
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <arch/context.h>
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define MAX_ISR_COUNT 256
|
||||
#else
|
||||
@@ -11,15 +13,15 @@
|
||||
|
||||
struct _isr_t;
|
||||
typedef struct _isr_t {
|
||||
void (*func)(struct _isr_t *self); // TODO pass register context as argument as well.
|
||||
void (*func)(struct _isr_t *self, context_t *ctx);
|
||||
void (*eoi)(struct _isr_t *self);
|
||||
long id;
|
||||
long priority;
|
||||
bool pending;
|
||||
} isr_t;
|
||||
|
||||
void interrupt_register(int vector, void (*func)(isr_t *self), void (*eoi)(isr_t *self), long priority); // TODO pass register context as well.
|
||||
isr_t *interrupt_allocate(void (*func)(isr_t *self), void (*eoi)(isr_t *self), long priority); // TODO pass register context as well.
|
||||
void interrupt_register(int vector, void (*func)(isr_t *self, context_t *ctx), void (*eoi)(isr_t *self), long priority);
|
||||
isr_t *interrupt_allocate(void (*func)(isr_t *self, context_t *ctx), void (*eoi)(isr_t *self), long priority);
|
||||
void interrupt_raiseipl(long newipl);
|
||||
void interrupt_loweripl(long newipl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user