diff options
author | 2024-06-07 02:36:56 +0000 | |
---|---|---|
committer | 2024-06-07 02:46:41 +0000 | |
commit | 1f5b95ff7d34f244e6ea1e7a5c94581de99891eb (patch) | |
tree | b619ae1d5dbffaf24be25d91187d8bee32fa68d7 /native/android/thermal.cpp | |
parent | 7d217a8ab7919adec8e1c2e13ef290091650d65b (diff) |
Add locking to performance hint NDK
This patch adds thread safety to the NDK, locking everything behind a
single mutex to avoid multiple lock acquisitions when operating on
shared state. All calls are asynchronous, except for createSession and
setThreads which don't need to hold the lock during their call, so the
risk of contesting the mutex is low.
Test: atest PerformanceHintNativeTest
Bug: 343817997
Change-Id: Ib08c11d6b7c84c30e83cca6613b15c62bcd8a68f
Diffstat (limited to 'native/android/thermal.cpp')
0 files changed, 0 insertions, 0 deletions