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

Commit 22b1af44 authored by Hongguang Chen's avatar Hongguang Chen Committed by Android (Google) Code Review
Browse files

Merge "Make mMutex the last attribute to be released" into main

parents 32d14c84 7a1e742d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -146,13 +146,14 @@ private:
    void cancelTimer() REQUIRES(mMutex);
    ScheduleResult scheduleLocked(CallbackToken, ScheduleTiming) REQUIRES(mMutex);

    std::mutex mutable mMutex;

    static constexpr nsecs_t kInvalidTime = std::numeric_limits<int64_t>::max();
    std::unique_ptr<TimeKeeper> const mTimeKeeper;
    VsyncSchedule::TrackerPtr mTracker;
    nsecs_t const mTimerSlack;
    nsecs_t const mMinVsyncDistance;

    std::mutex mutable mMutex;
    size_t mCallbackToken GUARDED_BY(mMutex) = 0;

    CallbackMap mCallbacks GUARDED_BY(mMutex);