Add thread safety analysis annotations.
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
Loading
Please register or sign in to comment