diff options
| -rw-r--r-- | sys/src/9/port/proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/9/port/proc.c b/sys/src/9/port/proc.c index 118561f3a..669c4652f 100644 --- a/sys/src/9/port/proc.c +++ b/sys/src/9/port/proc.c @@ -86,13 +86,15 @@ schedinit(void) /* never returns */ * palloc */ mmurelease(up); + unlock(&palloc); up->qnext = procalloc.free; procalloc.free = up; - unlock(&palloc); + /* proc is free now, make sure unlock() wont touch it */ + up = procalloc.p = nil; unlock(&procalloc); - break; + sched(); } up->mach = nil; updatecpu(up); |
