diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-06 08:39:38 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-10 15:02:44 -0800 |
commit | b28686f95daee16edeb5f39af2cd5274ac3dc99f (patch) | |
tree | 84d9f579f42b724ca4c1dce405f3c8a5901e9d9d /services/audioflinger/AudioFlinger.h | |
parent | 7ae4a2c130ec2cb5dec69d095b810698acc543b3 (diff) | |
download | frameworks_av-b28686f95daee16edeb5f39af2cd5274ac3dc99f.zip frameworks_av-b28686f95daee16edeb5f39af2cd5274ac3dc99f.tar.gz frameworks_av-b28686f95daee16edeb5f39af2cd5274ac3dc99f.tar.bz2 |
Simplify ThreadBase::exit() aka requestExitAndWait
We can remove mExiting and use Thread::exitPending() instead.
The local sp<> on "this" in exit() is not needed, since the caller must
also hold an sp<> in order to be calling us. (Unless it was using a raw
pointer, but that would be dangerous for other reasons.)
Add comment explaining the mLock in exit().
Change-Id: I319e5107533a1a7cdbd13c292685f3e2be60f6c4
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 97103c4..23cb924 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -419,6 +419,8 @@ private: audio_format_t format() const { return mFormat; } size_t frameCount() const { return mFrameCount; } void wakeUp() { mWaitWorkCV.broadcast(); } + // Should be "virtual status_t requestExitAndWait()" and override same + // method in Thread, but Thread::requestExitAndWait() is not yet virtual. void exit(); virtual bool checkForNewParameters_l() = 0; virtual status_t setParameters(const String8& keyValuePairs); @@ -550,7 +552,6 @@ private: Vector<ConfigEvent> mConfigEvents; bool mStandby; const audio_io_handle_t mId; - bool mExiting; Vector< sp<EffectChain> > mEffectChains; uint32_t mDevice; // output device for PlaybackThread // input + output devices for RecordThread |