OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0cd105
)
audioflinger: check for condition before waiting
author
Haynes Mathew George
<hgeorge@codeaurora.org>
Wed, 4 Dec 2013 05:26:02 +0000
(21:26 -0800)
committer
Eric Laurent
<elaurent@google.com>
Wed, 5 Mar 2014 00:03:12 +0000
(16:03 -0800)
AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.
Bug:
11824817
Change-Id: I04683a1f355de4f440106cab47fd916aa39d5e35
services/audioflinger/Threads.cpp
patch
|
blob
|
history
diff --git
a/services/audioflinger/Threads.cpp
b/services/audioflinger/Threads.cpp
index
64d7ec3
..
110e45c
100644
(file)
--- a/
services/audioflinger/Threads.cpp
+++ b/
services/audioflinger/Threads.cpp
@@
-3863,7
+3863,12
@@
bool AudioFlinger::AsyncCallbackThread::threadLoop()
{
Mutex::Autolock _l(mLock);
- mWaitWorkCV.wait(mLock);
+ while (!((mWriteAckSequence & 1) ||
+ (mDrainSequence & 1) ||
+ exitPending())) {
+ mWaitWorkCV.wait(mLock);
+ }
+
if (exitPending()) {
break;
}