1#include "syscall.h" 2#include "traps.h" 3 4#define STUB(name) \ 5 .globl name; \ 6 name: \ 7 movl $SYS_ ## name, %eax; \ 8 int $T_SYSCALL; \ 9 ret 10 11STUB(fork) 12STUB(exit) 13STUB(wait) 14STUB(pipe) 15STUB(read) 16STUB(write) 17STUB(close) 18STUB(kill) 19STUB(exec) 20STUB(open) 21STUB(mknod) 22STUB(unlink) 23STUB(fstat) 24STUB(link) 25STUB(mkdir) 26STUB(chdir) 27STUB(dup) 28STUB(getpid) 29STUB(sbrk) 30STUB(sleep) 31