Luna/kernel/include/interrupts/IDT.h

18 lines
351 B
C
Raw Normal View History

2022-09-05 14:13:51 +00:00
#pragma once
#include <stdint.h>
#define IDT_TA_InterruptGate 0b10001110
2022-09-23 14:41:43 +00:00
#define IDT_TA_InterruptGateUser 0b11101110
2022-09-05 14:13:51 +00:00
#define IDT_TA_TrapGate 0b10001111
2022-09-06 09:44:37 +00:00
struct IDTR
{
uint16_t limit;
uint64_t offset;
} __attribute__((packed));
2022-09-05 14:13:51 +00:00
namespace IDT
{
void add_handler(short interrupt_number, void* handler, uint8_t type_attr);
void load();
}