summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorVasily Tarasov2018-01-10 14:25:32 -0600
committerVasily Tarasov2018-01-10 14:25:32 -0600
commit713f289dd0e3658819560aeca38483f62d404256 (patch)
tree2463987a8ea27535cfb822c791aae5e657189ec9 /base
parentea4c7d572750597c864b13c180ae6f9903a02c02 (diff)
downloadplatform-system-core-713f289dd0e3658819560aeca38483f62d404256.tar.gz
platform-system-core-713f289dd0e3658819560aeca38483f62d404256.tar.xz
platform-system-core-713f289dd0e3658819560aeca38483f62d404256.zip
Adding per-method clang thread safety annotations
Change-Id: Ic92702a06570f48bf3616e0ee959a49e1eec393c
Diffstat (limited to 'base')
-rw-r--r--base/include/android-base/thread_annotations.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/include/android-base/thread_annotations.h b/base/include/android-base/thread_annotations.h
index fbb592336..1307f0e2c 100644
--- a/base/include/android-base/thread_annotations.h
+++ b/base/include/android-base/thread_annotations.h
@@ -38,6 +38,12 @@
38#define PT_GUARDED_BY(x) \ 38#define PT_GUARDED_BY(x) \
39 THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) 39 THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
40 40
41#define EXCLUSIVE_LOCKS_REQUIRED(...) \
42 THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(__VA_ARGS__))
43
44#define SHARED_LOCKS_REQUIRED(...) \
45 THREAD_ANNOTATION_ATTRIBUTE__(shared_locks_required(__VA_ARGS__))
46
41#define ACQUIRED_BEFORE(...) \ 47#define ACQUIRED_BEFORE(...) \
42 THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__)) 48 THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__))
43 49