commit | 56ce2edb667408420032e4c6535b0128f4484b10 | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Wed Jun 12 16:03:16 2024 -0700 |
committer | Andy Hung <hunga@google.com> | Fri Jun 14 18:24:22 2024 -0700 |
tree | 760a65ea56084a19566960d93ec27dfbce521003 | |
parent | 2718e0195adc0de3cf674a1ea98eda5e9c32e1fc [diff] |
AudioFlinger: defer restartIfDisabled() Defer restartIfDisabled() to the end of the threadLoop worker thread, allowing execution without any mutexes held. This prevents mutex order issues. To accomplish this, we add a DeferredExecutor object to ThreadBase, which allows adding functors and dtors to execute at the end of the worker loop, where no mutexes are held. Test: atest AudioPlaybackCaptureTest Bug: 345400492 Bug: 345676143 Change-Id: I1d7f491fc1289882ce67cb7289b3bc1b58e81d23