]> Devi Nivas Git - cs3210-lab0.git/commitdiff
nit
authorrsc <rsc>
Tue, 28 Aug 2007 12:52:14 +0000 (12:52 +0000)
committerrsc <rsc>
Tue, 28 Aug 2007 12:52:14 +0000 (12:52 +0000)
proc.c

diff --git a/proc.c b/proc.c
index 46a38bf2d9eb1fc5dfc4419d10919377c816bbd6..3991832b4663b5d8f501f04db9bfe1dd9ea4205f 100644 (file)
--- 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);
     }