diff options
author | Mathias Agopian <mathias@google.com> | 2009-09-30 14:42:13 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-09-30 15:15:07 -0700 |
commit | 448f015966f367da1791942ffe0b47ae7f9e42ca (patch) | |
tree | 2e7294269bc31b5460e7b93baffc70585e1345f0 /libs | |
parent | 02965e134d22a322cd51e6a2ed5c879824cfa6bf (diff) | |
download | frameworks_native-448f015966f367da1791942ffe0b47ae7f9e42ca.zip frameworks_native-448f015966f367da1791942ffe0b47ae7f9e42ca.tar.gz frameworks_native-448f015966f367da1791942ffe0b47ae7f9e42ca.tar.bz2 |
attempt to work around [2155085, 2150246] stuck in closeTransaction()
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index e468b23..eb0983a 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1125,7 +1125,14 @@ void SurfaceFlinger::closeGlobalTransaction() // take effect before returning. Mutex::Autolock _l(mStateLock); 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; + } } } } |