diff options
author | kolya <kolya> | 2008-10-15 05:14:10 +0000 |
---|---|---|
committer | kolya <kolya> | 2008-10-15 05:14:10 +0000 |
commit | c100d9ee2d7d02253b55349bf55796efb3be5699 (patch) | |
tree | a26b6880767ce56d0d408226d3b67a86ff758142 /proc.c | |
parent | 228e500a0c2b5a26492c84f73951a46c58c86509 (diff) | |
download | xv6-labs-c100d9ee2d7d02253b55349bf55796efb3be5699.tar.gz xv6-labs-c100d9ee2d7d02253b55349bf55796efb3be5699.tar.bz2 xv6-labs-c100d9ee2d7d02253b55349bf55796efb3be5699.zip |
cleaner swtch.S
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -137,9 +137,9 @@ copyproc(struct proc *p) } // Set up new context to start executing at forkret (see below). - memset(&np->context, 0, sizeof(np->context)); - np->context.eip = (uint)forkret; - np->context.esp = (uint)np->tf; + np->context = (struct context *)np->tf - 1; + memset(np->context, 0, sizeof(*np->context)); + np->context->eip = (uint)forkret; // Clear %eax so that fork system call returns 0 in child. np->tf->eax = 0; @@ -477,7 +477,7 @@ procdump(void) state = "???"; cprintf("%d %s %s", p->pid, state, p->name); if(p->state == SLEEPING){ - getcallerpcs((uint*)p->context.ebp+2, pc); + getcallerpcs((uint*)p->context->ebp+2, pc); for(j=0; j<10 && pc[j] != 0; j++) cprintf(" %p", pc[j]); } |