FENIX_kernel/include/kernel/interrupt.h

30 lines
578 B
C
Raw Normal View History

2020-12-02 03:00:09 +00:00
#ifndef _KERNEL_INTERRUPT
#define _KERNEL_INTERRUPT
2022-10-29 15:03:37 +00:00
#ifdef __GNUC__
struct IDT_entry {
unsigned short int offset_lowerbits;
unsigned short int selector;
unsigned char zero;
unsigned char type_attr;
unsigned short int offset_higherbits;
} __attribute__((packed));
#else
2020-12-02 03:00:09 +00:00
struct IDT_entry {
unsigned short int offset_lowerbits;
unsigned short int selector;
unsigned char zero;
unsigned char type_attr;
unsigned short int offset_higherbits;
};
2022-10-29 15:03:37 +00:00
#endif
2020-12-02 03:00:09 +00:00
2022-10-29 15:03:37 +00:00
#ifdef __GNUC__
__attribute((aligned(0x10)))
#endif
2020-12-02 03:00:09 +00:00
struct IDT_entry IDT[256];
void idt_init(void);
#endif