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

Commit c9561635 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
has already been satisfied before waiting.

Bug: 11824817
Change-Id: Ic8c2090d521ecd6a30b76ee75635258d35eb1eff
parent 645e4397
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3861,7 +3861,12 @@ bool AudioFlinger::AsyncCallbackThread::threadLoop()

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

            if (exitPending()) {
                break;
            }