From b6095304b7ee2b69d2ee4a9a7265999d1a2b9675 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 10 Aug 2007 16:37:27 +0000 Subject: Make cp a magic symbol. --- syscall.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'syscall.c') diff --git a/syscall.c b/syscall.c index adc2b58..d697337 100644 --- a/syscall.c +++ b/syscall.c @@ -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]) -- cgit v1.2.3