summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 07a88d8..4c2586d 100644
--- a/proc.c
+++ b/proc.c
@@ -148,7 +148,6 @@ scheduler(void)
if(i < NPROC){
np->state = RUNNING;
- release(&proc_table_lock);
break;
}
@@ -159,6 +158,8 @@ scheduler(void)
cpus[cpu()].lastproc = np;
curproc[cpu()] = np;
+ release(&proc_table_lock);
+
// h/w sets busy bit in TSS descriptor sometimes, and faults
// if it's set in LTR. so clear tss descriptor busy bit.
np->gdt[SEG_TSS].sd_type = STS_T32A;