Loading services/audiopolicy/service/AudioPolicyService.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -449,7 +449,7 @@ void AudioPolicyService::AudioCommandThread::onFirstRef() bool AudioPolicyService::AudioCommandThread::threadLoop() { nsecs_t waitTime = INT64_MAX; nsecs_t waitTime = -1; mLock.lock(); while (!exitPending()) Loading Loading @@ -614,7 +614,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() command->mCond.signal(); } } waitTime = INT64_MAX; waitTime = -1; // release mLock before releasing strong reference on the service as // AudioPolicyService destructor calls AudioCommandThread::exit() which // acquires mLock. Loading @@ -636,9 +636,13 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() // has a finite delay. So unless we are exiting it is safe to wait. if (!exitPending()) { ALOGV("AudioCommandThread() going to sleep"); if (waitTime == -1) { mWaitWorkCV.wait(mLock); } else { mWaitWorkCV.waitRelative(mLock, waitTime); } } } // release delayed commands wake lock before quitting if (!mAudioCommands.isEmpty()) { release_wake_lock(mName.string()); Loading Loading
services/audiopolicy/service/AudioPolicyService.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -449,7 +449,7 @@ void AudioPolicyService::AudioCommandThread::onFirstRef() bool AudioPolicyService::AudioCommandThread::threadLoop() { nsecs_t waitTime = INT64_MAX; nsecs_t waitTime = -1; mLock.lock(); while (!exitPending()) Loading Loading @@ -614,7 +614,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() command->mCond.signal(); } } waitTime = INT64_MAX; waitTime = -1; // release mLock before releasing strong reference on the service as // AudioPolicyService destructor calls AudioCommandThread::exit() which // acquires mLock. Loading @@ -636,9 +636,13 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() // has a finite delay. So unless we are exiting it is safe to wait. if (!exitPending()) { ALOGV("AudioCommandThread() going to sleep"); if (waitTime == -1) { mWaitWorkCV.wait(mLock); } else { mWaitWorkCV.waitRelative(mLock, waitTime); } } } // release delayed commands wake lock before quitting if (!mAudioCommands.isEmpty()) { release_wake_lock(mName.string()); Loading