summaryrefslogtreecommitdiff
path: root/kernel/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/syscall.c')
-rw-r--r--kernel/syscall.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/syscall.c b/kernel/syscall.c
index 2817e44..c1b3670 100644
--- a/kernel/syscall.c
+++ b/kernel/syscall.c
@@ -37,17 +37,17 @@ argraw(int n)
struct proc *p = myproc();
switch (n) {
case 0:
- return p->tf->a0;
+ return p->trapframe->a0;
case 1:
- return p->tf->a1;
+ return p->trapframe->a1;
case 2:
- return p->tf->a2;
+ return p->trapframe->a2;
case 3:
- return p->tf->a3;
+ return p->trapframe->a3;
case 4:
- return p->tf->a4;
+ return p->trapframe->a4;
case 5:
- return p->tf->a5;
+ return p->trapframe->a5;
}
panic("argraw");
return -1;
@@ -135,12 +135,12 @@ syscall(void)
int num;
struct proc *p = myproc();
- num = p->tf->a7;
+ num = p->trapframe->a7;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
- p->tf->a0 = syscalls[num]();
+ p->trapframe->a0 = syscalls[num]();
} else {
printf("%d %s: unknown sys call %d\n",
p->pid, p->name, num);
- p->tf->a0 = -1;
+ p->trapframe->a0 = -1;
}
}