If a CPU is disabled, continue serving any threads still pinned. Otherwise disabling a CPU in ProcessController at an inopportune time will result in a total system deadlock. Might explain part of the problem in ticket #3535.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29484 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2009-03-12 22:11:17 +00:00
parent 7a9cfbf50c
commit 3f71e54926

View File

@ -258,8 +258,12 @@ simple_reschedule(void)
prevThread = NULL;
if (oldThread->cpu->disabled) {
// CPU is disabled - just select an idle thread
// CPU is disabled - service any threads we may have that are pinned,
// otherwise just select the idle thread
while (nextThread && nextThread->priority > B_IDLE_PRIORITY) {
if (nextThread->pinned_to_cpu > 0 &&
nextThread->previous_cpu == oldThread->cpu)
break;
prevThread = nextThread;
nextThread = nextThread->queue_next;
}