Check for spurious wake ups
Condition::wait() can spuriously wake up, so we must guard it with another check to ensure that a given wake was truly due to having been signaled. Bug: 34592766 Test: Boot bullhead Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92
This commit is contained in:
@@ -345,7 +345,9 @@ void RenderThread::queueAndWait(RenderTask* task) {
|
||||
|
||||
AutoMutex _lock(mutex);
|
||||
queue(&syncTask);
|
||||
condition.wait(mutex);
|
||||
while (!syncTask.hasRun()) {
|
||||
condition.wait(mutex);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderThread::queueAtFront(RenderTask* task) {
|
||||
|
||||
Reference in New Issue
Block a user