diff options
author | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
---|---|---|
committer | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
commit | 48755214c9a02d6249caf3126d3b41d67eda4730 (patch) | |
tree | 2edc8b996fd7c3ef2da8876d657140e242999d93 /syscall.c | |
parent | 0aef8914959af9e472852611eb6352c211093d35 (diff) | |
download | xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.gz xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.bz2 xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.zip |
assorted fixes:
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
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; } } |