From 97ac612fb16748e6b011de4deaa803ec5f0afef8 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 24 Aug 2007 20:28:08 +0000 Subject: nits --- proc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 2ed2952..fb79444 100644 --- a/proc.c +++ b/proc.c @@ -65,15 +65,14 @@ growproc(int n) return cp->sz - n; } -// Set up CPU's segment descriptors and task state for a -// given process. -// If p==0, set up for "idle" state for when scheduler() -// is idling, not running any process. +// Set up CPU's segment descriptors and task state for a given process. +// If p==0, set up for "idle" state for when scheduler() is running. void setupsegs(struct proc *p) { - struct cpu *c = &cpus[cpu()]; - + struct cpu *c; + + c = &cpus[cpu()]; c->ts.ss0 = SEG_KDATA << 3; if(p) c->ts.esp0 = (uint)(p->kstack + KSTACKSIZE); -- cgit v1.2.3