diff options
Diffstat (limited to 'syscall.c')
-rw-r--r-- | syscall.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -44,7 +44,7 @@ fetchstr(struct proc *p, uint addr, char **pp) int argint(int n, int *ip) { - return fetchint(cp, cp->tf->esp + 4 + 4*n, ip); + return fetchint(proc, proc->tf->esp + 4 + 4*n, ip); } // Fetch the nth word-sized system call argument as a pointer @@ -57,9 +57,9 @@ argptr(int n, char **pp, int size) if(argint(n, &i) < 0) return -1; - if((uint)i >= cp->sz || (uint)i+size >= cp->sz) + if((uint)i >= proc->sz || (uint)i+size >= proc->sz) return -1; - *pp = cp->mem + i; + *pp = proc->mem + i; return 0; } @@ -73,7 +73,7 @@ argstr(int n, char **pp) int addr; if(argint(n, &addr) < 0) return -1; - return fetchstr(cp, addr, pp); + return fetchstr(proc, addr, pp); } extern int sys_chdir(void); @@ -125,12 +125,12 @@ syscall(void) { int num; - num = cp->tf->eax; + num = proc->tf->eax; if(num >= 0 && num < NELEM(syscalls) && syscalls[num]) - cp->tf->eax = syscalls[num](); + proc->tf->eax = syscalls[num](); else { cprintf("%d %s: unknown sys call %d\n", - cp->pid, cp->name, num); - cp->tf->eax = -1; + proc->pid, proc->name, num); + proc->tf->eax = -1; } } |