summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Ray Chin <raychin@google.com> 2023-07-17 16:39:22 +0800
committer Ray Chin <raychin@google.com> 2023-07-17 15:19:22 +0000
commit7a1e742d154f7c4fdc8c3fbdb799c9ec4db1eb4d (patch)
treed69e88343caaab4ea4a50a95c99821acf840ccfd /libs/ultrahdr/jpegencoderhelper.cpp
parent86e34535acfc71cff6381f21be4ce0c31f76963b (diff)
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
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions