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

Commit 325ee1c6 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Use consistent style of & reference for AutoMutex

AutoMutex, which is a typedef for Mutex::Autolock, is overloaded for
either a reference (&) or pointer (*) parameter, but we prefer to use
the reference form when the mutex is known at compile time.

Change-Id: I3515e6d6ab7959b2356a27fa3b04fd49e42cb31e
parent a8719ad9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1012,7 +1012,7 @@ void AudioFlinger::ThreadBase::exit()

    ALOGV("ThreadBase::exit");
    {
        AutoMutex lock(&mLock);
        AutoMutex lock(mLock);
        mExiting = true;
        requestExit();
        mWaitWorkCV.signal();
@@ -4501,7 +4501,7 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac
    sp <ThreadBase> strongMe = this;
    status_t status = NO_ERROR;
    {
        AutoMutex lock(&mLock);
        AutoMutex lock(mLock);
        if (mActiveTrack != 0) {
            if (recordTrack != mActiveTrack.get()) {
                status = -EBUSY;
@@ -4553,7 +4553,7 @@ void AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
    ALOGV("RecordThread::stop");
    sp <ThreadBase> strongMe = this;
    {
        AutoMutex lock(&mLock);
        AutoMutex lock(mLock);
        if (mActiveTrack != 0 && recordTrack == mActiveTrack.get()) {
            mActiveTrack->mState = TrackBase::PAUSING;
            // do not wait for mStartStopCond if exiting