feat fix GUARDED_BY

This commit is contained in:
tqcq
2024-03-16 16:46:49 +08:00
parent 193826df35
commit af0d3df984
2 changed files with 4 additions and 3 deletions

View File

@@ -14,7 +14,8 @@
#if defined(GUARDED_BY)
#undef GUARDED_BY
#endif
#define GUARDED_BY(x) __attribute__((guarded_by(x)))
#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
#if defined(__clang__)
#define EXCLUSIVE_TRYLOCK_FUNCTION(...) THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__))