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

Commit 79eb382f authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "audioserver: Add notification tid metadata to the command thread wait"...

Merge "audioserver: Add notification tid metadata to the command thread wait" into main am: 29479777

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2999256



Change-Id: I5a6bcc42a188b1eb4a1e2b01d156a967cb64752b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7fb2ccff 29479777
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -721,7 +721,8 @@ NO_THREAD_SAFETY_ANALYSIS // condition variable
    {
        audio_utils::unique_lock _l(event->mutex());
        while (event->mWaitStatus) {
            if (event->mCondition.wait_for(_l, std::chrono::nanoseconds(kConfigEventTimeoutNs))
            if (event->mCondition.wait_for(
                    _l, std::chrono::nanoseconds(kConfigEventTimeoutNs), getTid())
                            == std::cv_status::timeout) {
                event->mStatus = TIMED_OUT;
                event->mWaitStatus = false;
+1 −1
Original line number Diff line number Diff line
@@ -2481,7 +2481,7 @@ status_t AudioPolicyService::AudioCommandThread::sendCommand(sp<AudioCommand>& c
    while (command->mWaitStatus) {
        nsecs_t timeOutNs = kAudioCommandTimeoutNs + milliseconds(delayMs);
        if (command->mCond.wait_for(
                    ul, std::chrono::nanoseconds(timeOutNs)) == std::cv_status::timeout) {
                ul, std::chrono::nanoseconds(timeOutNs), getTid()) == std::cv_status::timeout) {
            command->mStatus = TIMED_OUT;
            command->mWaitStatus = false;
        }