blob: 0878b30517385bdc9797c58f1c000327e143b6b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#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(process_exit, process_exit_sc);
CALL1(monitor_write, printk_sc);
int_callback syscalls[] = {
thread_exit_sc,
schedule_sc,
0, //Syscall 2 will be thread_sleep
process_exit_sc,
printk_sc,
0 };
|