Adding per-method clang thread safety annotations

Change-Id: Ic92702a06570f48bf3616e0ee959a49e1eec393c
This commit is contained in:
Vasily Tarasov 2018-01-10 12:25:32 -08:00
parent ea4c7d5727
commit 713f289dd0
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@
#define PT_GUARDED_BY(x) \
THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
#define EXCLUSIVE_LOCKS_REQUIRED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(__VA_ARGS__))
#define SHARED_LOCKS_REQUIRED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(shared_locks_required(__VA_ARGS__))
#define ACQUIRED_BEFORE(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__))