diff options
author | Robert Morris <[email protected]> | 2010-09-13 15:34:44 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2010-09-13 15:34:44 -0400 |
commit | faad047ab22cbe989c208bff5ecb42608ecb8d7b (patch) | |
tree | b47cd8948dcbc5c86117982245b53f4e9c95dc30 /proc.c | |
parent | 124fe7e457c0dc9b671c7ffccb56004eb61da4f0 (diff) | |
download | xv6-labs-faad047ab22cbe989c208bff5ecb42608ecb8d7b.tar.gz xv6-labs-faad047ab22cbe989c208bff5ecb42608ecb8d7b.tar.bz2 xv6-labs-faad047ab22cbe989c208bff5ecb42608ecb8d7b.zip |
change some comments, maybe more informative
delete most comments from bootother.S (since copy of bootasm.S)
ksegment() -> seginit()
move more stuff from main() to mainc()
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -65,7 +65,8 @@ procdump(void) //PAGEBREAK: 32 // Look in the process table for an UNUSED proc. -// If found, change state to EMBRYO and return it. +// If found, change state to EMBRYO and initialize +// state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) @@ -97,7 +98,7 @@ found: p->tf = (struct trapframe*)sp; // Set up new context to start executing at forkret, - // which returns to trapret (see below). + // which returns to trapret. sp -= 4; *(uint*)sp = (uint)trapret; @@ -105,6 +106,7 @@ found: p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); p->context->eip = (uint)forkret; + return p; } |