why can't i get a lock in console code?
always triple fault
lock code shouldn't call cprintf...
+ide_init doesn't work now?
+and IOAPIC: read from unsupported address
+ when running pre-empt user test
+ so maybe something wrong with clock interrupts
+ no! if one cpu holds lock w/ curproc0=,
+ then another cpu can take it, it looks like
+ a recursive acquire()
if(i < NPROC){
np->state = RUNNING;
- release(&proc_table_lock);
break;
}
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;