am 98a9c56a: attempt to work around [2155085, 2150246] stuck in closeTransaction()

Merge commit '98a9c56acf1857adaf1773bd91c88a8364fd3fa8' into eclair-plus-aosp

* commit '98a9c56acf1857adaf1773bd91c88a8364fd3fa8':
  attempt to work around [2155085, 2150246] stuck in closeTransaction()
This commit is contained in:
Mathias Agopian
2009-09-30 15:28:52 -07:00
committed by Android Git Automerger

View File

@@ -1125,7 +1125,14 @@ void SurfaceFlinger::closeGlobalTransaction()
// take effect before returning. // take effect before returning.
Mutex::Autolock _l(mStateLock); Mutex::Autolock _l(mStateLock);
while (mResizeTransationPending) { while (mResizeTransationPending) {
mTransactionCV.wait(mStateLock); status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5));
if (CC_UNLIKELY(err != NO_ERROR)) {
// just in case something goes wrong in SF, return to the
// called after a few seconds.
LOGW_IF(err == TIMED_OUT, "closeGlobalTransaction timed out!");
mResizeTransationPending = false;
break;
}
} }
} }
} }