Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 782 → Rev 783

/kernel/trunk/generic/src/proc/thread.c
137,16 → 137,8
 
atomic_inc(&nrdy);
avg = atomic_get(&nrdy) / config.cpu_active;
atomic_inc(&cpu->nrdy);
 
spinlock_lock(&cpu->lock);
if ((++cpu->nrdy) > avg) {
/*
* If there are idle halted CPU's, this will wake them up.
*/
ipi_broadcast(VECTOR_WAKEUP_IPI);
}
spinlock_unlock(&cpu->lock);
 
interrupts_restore(ipl);
}