matos/arch/x86/swintr.c
2021-11-04 11:40:53 +01:00

19 lines
316 B
C

#include "assert.h"
#include "swintr.h"
#include "irq.h"
#include "idt.h"
extern void syscallHandler();
int syscallSetup(){
uint32_t flags, ret;
disable_IRQs(flags);
ret = idt_set_handler(SYSCALL_INTR_NB, (vaddr_t)syscallHandler, 3);
restore_IRQs(flags);
assert(ret == 0);
return ret;
}