8#if defined(__clang__) && (!defined(SWIG))
9#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
11#define THREAD_ANNOTATION_ATTRIBUTE__(x)
14#define CAPABILITY(x) \
15 THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
17#define SCOPED_CAPABILITY \
18 THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
20#define GUARDED_BY(x) \
21 THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
23#define PT_GUARDED_BY(x) \
24 THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
26#define ACQUIRED_BEFORE(...) \
27 THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__))
29#define ACQUIRED_AFTER(...) \
30 THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__))
32#define REQUIRES(...) \
33 THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(__VA_ARGS__))
35#define REQUIRES_SHARED(...) \
36 THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(__VA_ARGS__))
39 THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(__VA_ARGS__))
41#define ACQUIRE_SHARED(...) \
42 THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(__VA_ARGS__))
45 THREAD_ANNOTATION_ATTRIBUTE__(release_capability(__VA_ARGS__))
47#define RELEASE_SHARED(...) \
48 THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(__VA_ARGS__))
50#define RELEASE_GENERIC(...) \
51 THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(__VA_ARGS__))
53#define TRY_ACQUIRE(...) \
54 THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(__VA_ARGS__))
56#define TRY_ACQUIRE_SHARED(...) \
57 THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(__VA_ARGS__))
59#define EXCLUDES(...) \
60 THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__))
62#define ASSERT_CAPABILITY(x) \
63 THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
65#define ASSERT_SHARED_CAPABILITY(x) \
66 THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
68#define RETURN_CAPABILITY(x) \
69 THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
71#define NO_THREAD_SAFETY_ANALYSIS \
72 THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
CLock & m_Lock
Definition: lock.h:132
CLockScope(CLock &Lock)
Definition: lock.h:120
~CLockScope()
Definition: lock.h:126
void lock()
Definition: lock.h:92
std::mutex m_Mutex
Definition: lock.h:106
const CLock & operator!() const
Definition: lock.h:103
void unlock()
Definition: lock.h:97
#define RELEASE(...)
Definition: lock.h:44
#define REQUIRES(...)
Definition: lock.h:32
#define ACQUIRE(...)
Definition: lock.h:38
#define SCOPED_CAPABILITY
Definition: lock.h:17
#define CAPABILITY(x)
Definition: lock.h:14