commit fc210467548dabbbf196227ec279b3c3301c9951
parent 818fc0125e7d73fdf4f1a94f178254e5d05c9831
Author: rsc <rsc>
Date: Tue, 28 Aug 2007 12:52:14 +0000
nit
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/proc.c b/proc.c
@@ -202,16 +202,14 @@ scheduler(void)
// Switch to chosen process. It is the process's job
// to release proc_table_lock and then reacquire it
// before jumping back to us.
-
- setupsegs(p);
cp = p;
+ setupsegs(p);
p->state = RUNNING;
swtch(&cpus[cpu()].context, &p->context);
// Process is done running for now.
// It should have changed its p->state before coming back.
cp = 0;
-
setupsegs(0);
}