From 6a52d123672b7a00af6e22b4c138205be2042a94 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sat, 6 Feb 2010 20:51:56 +0100 Subject: Reorganisation --- src/kernel/task/syscall.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/kernel/task/syscall.c (limited to 'src/kernel/task/syscall.c') diff --git a/src/kernel/task/syscall.c b/src/kernel/task/syscall.c new file mode 100644 index 0000000..5aab011 --- /dev/null +++ b/src/kernel/task/syscall.c @@ -0,0 +1,21 @@ +#include "syscall.h" + +#define CALL0(name, scname) static void scname(struct registers* r) { r->eax = name(); } +#define CALL1(name, scname) static void scname(struct registers* r) { \ + r->eax = name(r->ebx); } +#define CALL2(name, scname) static void scname(struct registers* r) { \ + r->eax = name(r->ebx, r->ecx); } + +CALL0(thread_exit, thread_exit_sc); +CALL0(tasking_switch, schedule_sc); +CALL1(thread_sleep, thread_sleep_sc); +CALL1(process_exit, process_exit_sc); +CALL1(monitor_write, printk_sc); + +int_callback syscalls[] = { + thread_exit_sc, + schedule_sc, + thread_sleep_sc, + process_exit_sc, + printk_sc, + 0 }; -- cgit v1.2.3