diff options
Diffstat (limited to 'syscall.c')
-rw-r--r-- | syscall.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -53,7 +53,6 @@ fetchstr(struct proc *p, uint addr, char **pp) int argint(int argno, int *ip) { - struct proc *cp = curproc[cpu()]; return fetchint(cp, cp->tf->esp + 4 + 4*argno, ip); } @@ -65,7 +64,6 @@ int argptr(int argno, char **pp, int size) { int i; - struct proc *cp = curproc[cpu()]; if(argint(argno, &i) < 0) return -1; @@ -85,7 +83,7 @@ argstr(int argno, char **pp) int addr; if(argint(argno, &addr) < 0) return -1; - return fetchstr(curproc[cpu()], addr, pp); + return fetchstr(cp, addr, pp); } extern int sys_chdir(void); @@ -133,7 +131,6 @@ static int (*syscalls[])(void) = { void syscall(void) { - struct proc *cp = curproc[cpu()]; int num = cp->tf->eax; if(num >= 0 && num < NELEM(syscalls) && syscalls[num]) |