diff options
author | rtm <rtm> | 2006-06-26 20:31:52 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-06-26 20:31:52 +0000 |
commit | b61c2547b8b489cab16984c0940a1cb6593a2a3d (patch) | |
tree | 3ff33920d08b6221ec32b7aaff583a32edc8001b /proc.c | |
parent | a44ee3cde8b55c314410210b9f3076797b9925fc (diff) | |
download | xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.tar.gz xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.tar.bz2 xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.zip |
system call return values
initialize 2nd cpu's idt
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -73,6 +73,7 @@ newproc() // set up kernel stack to return to user space np->tf = (struct Trapframe *) (np->kstack + KSTACKSIZE - sizeof(struct Trapframe)); *(np->tf) = *(op->tf); + np->tf->tf_regs.reg_eax = 0; // so fork() returns 0 in child sp = (unsigned *) np->tf; *(--sp) = (unsigned) &trapret; // for return from swtch() *(--sp) = 0; // previous bp for leave in swtch() |