Don't clobber the thread variable as we use it again. Since it always is NULL

at the end of that loop we guaranteed a crash when this special handling was
triggered.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23748 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-01-26 18:17:12 +00:00
parent a763522da6
commit 1b0e74fc18
+4 -2
View File
@@ -938,8 +938,10 @@ switch_sem_etc(sem_id semToBeReleased, sem_id id, int32 count,
B_INTERRUPTED, true);
}
RELEASE_SEM_LOCK(sSems[slot]);
while ((thread = thread_dequeue(&wakeupQueue)) != NULL)
scheduler_enqueue_in_run_queue(thread);
struct thread *wakeupThread;
while ((wakeupThread = thread_dequeue(&wakeupQueue)) != NULL)
scheduler_enqueue_in_run_queue(wakeupThread);
// fall through and reschedule since another thread with a higher priority may have been woken up
}