blob: 26a0002fab01cb2228bef7e4a41473b328874105 [file] [log] [blame]
#include "syscall.h"
#include "log.h"
#include "pic.h"
#include "task.h"
#include <sys.h>
void do_syscall(struct registers *regs)
{
switch (regs->eax)
{
case SYS_GIVEUP:
// easy, just switch tasks
switch_task(*regs);
break;
default:
kprintf(INFO "Syscall executed: %d\n", regs->eax);
}
}
void init_syscall()
{
add_interrupt_handler(SYSCALL_INT, do_syscall);
}