提交 949e5590 创建 作者: rsc's avatar rsc

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

上级 90bab908
...@@ -66,8 +66,8 @@ timer.c ...@@ -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
#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)
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论