diff options
Diffstat (limited to 'src/stem/task/syscall.c')
-rw-r--r-- | src/stem/task/syscall.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stem/task/syscall.c b/src/stem/task/syscall.c new file mode 100644 index 0000000..281d680 --- /dev/null +++ b/src/stem/task/syscall.c @@ -0,0 +1,16 @@ +#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(tasking_switch, schedule_sc); + +int_callback syscalls[] = { + 0, //Syscall 0 will be thread_exit + schedule_sc, + 0, //Syscall 2 will be thread_sleep + 0, //Syscall 3 will be process_exit + 0 }; |