提交 fc210467 创建 作者: rsc's avatar rsc

nit

上级 818fc012
...@@ -202,16 +202,14 @@ scheduler(void) ...@@ -202,16 +202,14 @@ scheduler(void)
// Switch to chosen process. It is the process's job // Switch to chosen process. It is the process's job
// to release proc_table_lock and then reacquire it // to release proc_table_lock and then reacquire it
// before jumping back to us. // before jumping back to us.
setupsegs(p);
cp = p; cp = p;
setupsegs(p);
p->state = RUNNING; p->state = RUNNING;
swtch(&cpus[cpu()].context, &p->context); swtch(&cpus[cpu()].context, &p->context);
// Process is done running for now. // Process is done running for now.
// It should have changed its p->state before coming back. // It should have changed its p->state before coming back.
cp = 0; cp = 0;
setupsegs(0); setupsegs(0);
} }
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论