summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/syscall.c b/syscall.c
index 787eb64..03fe608 100644
--- a/syscall.c
+++ b/syscall.c
@@ -39,7 +39,7 @@ fetcharg(int argno, int *ip)
unsigned esp;
esp = (unsigned) curproc[cpu()]->tf->tf_esp;
- return fetchint(curproc[cpu()], esp + 8 + 4*argno, ip);
+ return fetchint(curproc[cpu()], esp + 4 + 4*argno, ip);
}
int
@@ -178,6 +178,7 @@ sys_exit()
if(p->ppid == cp->pid)
p->pid = 1;
+ // switch into scheduler
swtch();
return 0;