提交 67a9314a 创建 作者: rsc's avatar rsc

Add void for ANSI C

上级 7f419a0d
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
* Return value? Error indication? Errno? * Return value? Error indication? Errno?
*/ */
extern struct spinlock proc_table_lock;
/* /*
* fetch 32 bits from a user-supplied pointer. * fetch 32 bits from a user-supplied pointer.
* returns 0 if addr was OK, -1 if illegal. * returns 0 if addr was OK, -1 if illegal.
...@@ -55,7 +53,7 @@ putint(struct proc *p, unsigned addr, int ip) ...@@ -55,7 +53,7 @@ putint(struct proc *p, unsigned addr, int ip)
} }
int int
sys_pipe() sys_pipe(void)
{ {
struct fd *rfd = 0, *wfd = 0; struct fd *rfd = 0, *wfd = 0;
int f1 = -1, f2 = -1; int f1 = -1, f2 = -1;
...@@ -92,7 +90,7 @@ sys_pipe() ...@@ -92,7 +90,7 @@ sys_pipe()
} }
int int
sys_write() sys_write(void)
{ {
int fd, n, ret; int fd, n, ret;
unsigned addr; unsigned addr;
...@@ -111,7 +109,7 @@ sys_write() ...@@ -111,7 +109,7 @@ sys_write()
} }
int int
sys_read() sys_read(void)
{ {
int fd, n, ret; int fd, n, ret;
unsigned addr; unsigned addr;
...@@ -130,7 +128,7 @@ sys_read() ...@@ -130,7 +128,7 @@ sys_read()
} }
int int
sys_close() sys_close(void)
{ {
int fd; int fd;
struct proc *p = curproc[cpu()]; struct proc *p = curproc[cpu()];
...@@ -147,7 +145,7 @@ sys_close() ...@@ -147,7 +145,7 @@ sys_close()
} }
int int
sys_fork() sys_fork(void)
{ {
struct proc *np; struct proc *np;
...@@ -161,14 +159,14 @@ sys_fork() ...@@ -161,14 +159,14 @@ sys_fork()
} }
int int
sys_exit() sys_exit(void)
{ {
proc_exit(); proc_exit();
return 0; return 0;
} }
int int
sys_wait() sys_wait(void)
{ {
struct proc *p; struct proc *p;
struct proc *cp = curproc[cpu()]; struct proc *cp = curproc[cpu()];
...@@ -199,7 +197,7 @@ sys_wait() ...@@ -199,7 +197,7 @@ sys_wait()
} }
int int
sys_cons_putc() sys_cons_putc(void)
{ {
int c; int c;
...@@ -234,7 +232,7 @@ sys_block(void) ...@@ -234,7 +232,7 @@ sys_block(void)
} }
int int
sys_kill() sys_kill(void)
{ {
int pid; int pid;
struct proc *p; struct proc *p;
...@@ -255,7 +253,7 @@ sys_kill() ...@@ -255,7 +253,7 @@ sys_kill()
} }
int int
sys_panic() sys_panic(void)
{ {
struct proc *p = curproc[cpu()]; struct proc *p = curproc[cpu()];
unsigned int addr; unsigned int addr;
...@@ -266,7 +264,7 @@ sys_panic() ...@@ -266,7 +264,7 @@ sys_panic()
} }
void void
syscall() syscall(void)
{ {
struct proc *cp = curproc[cpu()]; struct proc *cp = curproc[cpu()];
int num = cp->tf->tf_regs.reg_eax; int num = cp->tf->tf_regs.reg_eax;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论