Loading services/audioflinger/Threads.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -7608,6 +7608,23 @@ void DuplicatingThread::threadLoop_standby() } } void DuplicatingThread::threadLoop_exit() { // Prevent calling the OutputTrack dtor in the DuplicatingThread dtor // where other mutexes (i.e. AudioPolicyService_Mutex) may be held. // Do so here in the threadLoop_exit(). SortedVector <sp<IAfOutputTrack>> localTracks; { audio_utils::lock_guard l(mutex()); localTracks = std::move(mOutputTracks); mOutputTracks.clear(); } localTracks.clear(); outputTracks.clear(); PlaybackThread::threadLoop_exit(); } void DuplicatingThread::dumpInternals_l(int fd, const Vector<String16>& args) { MixerThread::dumpInternals_l(fd, args); Loading services/audioflinger/Threads.h +1 −0 Original line number Diff line number Diff line Loading @@ -1849,6 +1849,7 @@ protected: void threadLoop_sleepTime() final REQUIRES(ThreadBase_ThreadLoop); ssize_t threadLoop_write() final REQUIRES(ThreadBase_ThreadLoop); void threadLoop_standby() final REQUIRES(ThreadBase_ThreadLoop); void threadLoop_exit() final REQUIRES(ThreadBase_ThreadLoop); void cacheParameters_l() final REQUIRES(mutex(), ThreadBase_ThreadLoop); private: Loading Loading
services/audioflinger/Threads.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -7608,6 +7608,23 @@ void DuplicatingThread::threadLoop_standby() } } void DuplicatingThread::threadLoop_exit() { // Prevent calling the OutputTrack dtor in the DuplicatingThread dtor // where other mutexes (i.e. AudioPolicyService_Mutex) may be held. // Do so here in the threadLoop_exit(). SortedVector <sp<IAfOutputTrack>> localTracks; { audio_utils::lock_guard l(mutex()); localTracks = std::move(mOutputTracks); mOutputTracks.clear(); } localTracks.clear(); outputTracks.clear(); PlaybackThread::threadLoop_exit(); } void DuplicatingThread::dumpInternals_l(int fd, const Vector<String16>& args) { MixerThread::dumpInternals_l(fd, args); Loading
services/audioflinger/Threads.h +1 −0 Original line number Diff line number Diff line Loading @@ -1849,6 +1849,7 @@ protected: void threadLoop_sleepTime() final REQUIRES(ThreadBase_ThreadLoop); ssize_t threadLoop_write() final REQUIRES(ThreadBase_ThreadLoop); void threadLoop_standby() final REQUIRES(ThreadBase_ThreadLoop); void threadLoop_exit() final REQUIRES(ThreadBase_ThreadLoop); void cacheParameters_l() final REQUIRES(mutex(), ThreadBase_ThreadLoop); private: Loading