usys.S: put before init.c, STUB -> SYSCALL

This commit is contained in:
rsc 2009-05-31 02:14:04 +00:00
parent 90bab90832
commit 949e55902b
2 changed files with 22 additions and 22 deletions

View file

@ -66,8 +66,8 @@ timer.c
# user-level # user-level
initcode.S initcode.S
init.c
usys.S usys.S
init.c
sh.c sh.c

42
usys.S
View file

@ -1,30 +1,30 @@
#include "syscall.h" #include "syscall.h"
#include "traps.h" #include "traps.h"
#define STUB(name) \ #define SYSCALL(name) \
.globl name; \ .globl name; \
name: \ name: \
movl $SYS_ ## name, %eax; \ movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \ int $T_SYSCALL; \
ret ret
STUB(fork) SYSCALL(fork)
STUB(exit) SYSCALL(exit)
STUB(wait) SYSCALL(wait)
STUB(pipe) SYSCALL(pipe)
STUB(read) SYSCALL(read)
STUB(write) SYSCALL(write)
STUB(close) SYSCALL(close)
STUB(kill) SYSCALL(kill)
STUB(exec) SYSCALL(exec)
STUB(open) SYSCALL(open)
STUB(mknod) SYSCALL(mknod)
STUB(unlink) SYSCALL(unlink)
STUB(fstat) SYSCALL(fstat)
STUB(link) SYSCALL(link)
STUB(mkdir) SYSCALL(mkdir)
STUB(chdir) SYSCALL(chdir)
STUB(dup) SYSCALL(dup)
STUB(getpid) SYSCALL(getpid)
STUB(sbrk) SYSCALL(sbrk)
STUB(sleep) SYSCALL(sleep)