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

Commit 24a325d6 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: Ic8c2090d521ecd6a30b76ee75635258d35eb1eff
parent aef04853
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3874,7 +3874,12 @@ bool AudioFlinger::AsyncCallbackThread::threadLoop()

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

            if (exitPending()) {
                break;
            }