summaryrefslogtreecommitdiff
path: root/src/stem/task/syscall.c
blob: 281d68066a2e8f6abf2536d74dff8e1c9df1c55d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 };