1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-02-24 15:55:41 -05:00
kernel/arch/x86/syscall.c

23 lines
517 B
C
Raw Normal View History

2017-11-05 12:44:57 +00:00
#include "interrupt.h"
2017-11-06 03:48:16 +00:00
#include "logger.h"
2017-11-05 09:50:04 +00:00
2017-11-05 17:15:34 +00:00
#include <kernelmq/syscall.h>
static void syscall_do_exit(struct IsrRegisters regs);
void syscall_handler(const struct IsrRegisters regs)
2017-11-05 09:50:04 +00:00
{
2017-11-07 05:25:24 +00:00
const unsigned int id = regs.eax;
2017-11-05 09:50:04 +00:00
2017-11-05 17:15:34 +00:00
switch (id) {
case KERNELMQ_SYSCALL_EXIT: return syscall_do_exit(regs);
}
2017-11-06 04:21:18 +00:00
logger_info_from("syscall", "number %u", id);
2017-11-05 09:50:04 +00:00
}
2017-11-05 17:15:34 +00:00
void syscall_do_exit(const struct IsrRegisters regs)
{
2017-11-07 05:25:24 +00:00
logger_warn_from("syscall", "process try to exit with error code %u, haha", regs.ebx);
2017-11-05 17:15:34 +00:00
}