Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50c3157c authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Eric Laurent
Browse files

audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.

Bug: 11824817
Change-Id: I04683a1f355de4f440106cab47fd916aa39d5e35
parent e0cd1051
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3863,7 +3863,12 @@ bool AudioFlinger::AsyncCallbackThread::threadLoop()

        {
            Mutex::Autolock _l(mLock);
            while (!((mWriteAckSequence & 1) ||
                     (mDrainSequence & 1) ||
                     exitPending())) {
                mWaitWorkCV.wait(mLock);
            }

            if (exitPending()) {
                break;
            }