DescriptionAdd a mutex lock to AudioPowerMonitor::Reset() to placate TSAN.
Since Reset() is not a high-performance code path, it's acceptable to
add the extra mutex lock while resetting all the member variables. By
design, it was not actually harmful that ReadCurrentPowerAndClip() was
making a racey read.
BUG=418290
Committed: https://crrev.com/a63a57f288c10e746c5623b86446a663eb5d683d
Cr-Commit-Position: refs/heads/master@{#297545}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Clarify variable read/write safety in Reset() method. #Messages
Total messages: 9 (2 generated)
|