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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user