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

Skip to content
Commit 7a1e742d authored by Ray Chin's avatar Ray Chin
Browse files

Make mMutex the last attribute to be released

The original attribute declaration order was mTimeKeeper -> mMutex.
This will cause the mMutex be released prior than mTimeKeepr. When
mMutex has been released and mTimeKeeper is still running dispatch(),
the callback can be invoked and try to lock the released mMutex. Please
check the error in https://b.corp.google.com/issues/284388255#comment37.

This CL change the declaration order as mMutex -> mTimekeeper so that
the release order become mTimeKeeper -> mMutex. When releasing
mTimeKeeper, the ~Timer() will join the dispatch thread and thus ensure
the callback won't be invoked after mMutex get released.

Bug: 284388255
Test: Build, flash and run suspend<->resume test for over 96 hours.
Change-Id: I75a3946e641cbe19a0caaeb91433010edcd9c0c7
parent 86e34535
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment