Rev 557 | Rev 631 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 557 | Rev 625 | ||
---|---|---|---|
Line 488... | Line 488... | ||
488 | * other CPU's. Note that situation can have changed between two |
488 | * other CPU's. Note that situation can have changed between two |
489 | * passes. Each time get the most up to date counts. |
489 | * passes. Each time get the most up to date counts. |
490 | */ |
490 | */ |
491 | ipl = interrupts_disable(); |
491 | ipl = interrupts_disable(); |
492 | spinlock_lock(&CPU->lock); |
492 | spinlock_lock(&CPU->lock); |
493 | count = nrdy / config.cpu_active; |
493 | count = atomic_get(&nrdy) / config.cpu_active; |
494 | count -= CPU->nrdy; |
494 | count -= CPU->nrdy; |
495 | spinlock_unlock(&CPU->lock); |
495 | spinlock_unlock(&CPU->lock); |
496 | interrupts_restore(ipl); |
496 | interrupts_restore(ipl); |
497 | 497 | ||
498 | if (count <= 0) |
498 | if (count <= 0) |
Line 616... | Line 616... | ||
616 | 616 | ||
617 | satisfied: |
617 | satisfied: |
618 | /* |
618 | /* |
619 | * Tell find_best_thread() to wake us up later again. |
619 | * Tell find_best_thread() to wake us up later again. |
620 | */ |
620 | */ |
621 | CPU->kcpulbstarted = 0; |
621 | atomic_set(&CPU->kcpulbstarted,0); |
622 | goto loop; |
622 | goto loop; |
623 | } |
623 | } |
624 | 624 | ||
625 | #endif /* CONFIG_SMP */ |
625 | #endif /* CONFIG_SMP */ |