fixed build error

This commit is contained in:
notsomeidiot123 2024-11-04 17:39:52 -05:00
parent 6400fafa81
commit c7d5b6f163
2 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,7 @@ cpu_registers_t *(*interrupt_handlers[16])(cpu_registers_t *regs) = {0};
void _irq_handler(cpu_registers_t *regs){ void _irq_handler(cpu_registers_t *regs){
if(regs->int_no == 0x80){ if(regs->int_no == 0x80){
syscall(regs); regs = syscall(regs);
} }
else if(interrupt_handlers[regs->int_no - 32]) else if(interrupt_handlers[regs->int_no - 32])
{ {

View File

@ -21,6 +21,8 @@ typedef struct idt{
#define IDT_DPL_KERNEL 0 << 5 #define IDT_DPL_KERNEL 0 << 5
#define IDT_DPL_USER 3 << 5 #define IDT_DPL_USER 3 << 5
cpu_registers_t *syscall(cpu_registers_t * regs);
inline void enable_interrupts(){ inline void enable_interrupts(){
asm volatile("sti"); asm volatile("sti");
} }