1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-12-11 11:35:39 -05:00
kernel/arch/syscall.c
2017-11-06 04:21:18 +00:00

22 lines
535 B
C

#include "interrupt.h"
#include "logger.h"
#include <kernelmq/syscall.h>
static void syscall_do_exit(struct IsrRegisters regs);
void syscall_handler(const struct IsrRegisters regs)
{
const unsigned int id = regs.eax & 0xFFFF;
switch (id) {
case KERNELMQ_SYSCALL_EXIT: return syscall_do_exit(regs);
}
logger_info_from("syscall", "number %u", id);
}
void syscall_do_exit(const struct IsrRegisters regs)
{
logger_warn_from("syscall", "process try to exit with error code %u, haha", regs.ebx & 0xFFFF);
}