summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-10 16:37:27 +0000
committerrsc <rsc>2007-08-10 16:37:27 +0000
commitb6095304b7ee2b69d2ee4a9a7265999d1a2b9675 (patch)
tree3193df85e9fc228f512010d4bddf3aeb31e9993e /syscall.c
parent3bbbaca14db70c6f255139c66a62b4cd5191462c (diff)
downloadxv6-labs-b6095304b7ee2b69d2ee4a9a7265999d1a2b9675.tar.gz
xv6-labs-b6095304b7ee2b69d2ee4a9a7265999d1a2b9675.tar.bz2
xv6-labs-b6095304b7ee2b69d2ee4a9a7265999d1a2b9675.zip
Make cp a magic symbol.
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c5
1 files changed, 1 insertions, 4 deletions
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])