Enable thread safety analysis annotations for clang. See https://clang.llvm.org/docs/ThreadSafetyAnalysis.html for instructions on using these in the source code. Bug: 28094863 Test: annotated frameworks/native/services/inputflinger/InputDispatcher.cpp and enabled '-Werror' and '-Wthread-safety' clang compiler flags in Android.bp for inputflinger. Observed compiler errors when accessing instance attributes without holding a lock. Also added a compile test Mutex_test.cpp, which can be build using m libutils_tests and run using /data/nativetest64/libutils_tests/libutils_tests Change-Id: I24ce111241cc339901bc45dda8b446df5299af4a |
||
|---|---|---|
| .. | ||
| Android.bp | ||
| BitSet_test.cpp | ||
| BlobCache_test.cpp | ||
| Looper_test.cpp | ||
| LruCache_test.cpp | ||
| Mutex_test.cpp | ||
| README.txt | ||
| RefBase_test.cpp | ||
| Singleton_test.cpp | ||
| Singleton_test.h | ||
| Singleton_test1.cpp | ||
| Singleton_test2.cpp | ||
| String8_test.cpp | ||
| StrongPointer_test.cpp | ||
| SystemClock_test.cpp | ||
| TestHelpers.h | ||
| Unicode_test.cpp | ||
| Vector_test.cpp | ||
Run device tests: mma -j<whatever> (after adb root; adb disable-verity; adb reboot) adb root adb remount adb sync adb shell /data/nativetest/libutils_tests/libutils_tests