5 #ifndef RTE_LOCK_ANNOTATIONS_H 6 #define RTE_LOCK_ANNOTATIONS_H 12 #ifdef RTE_ANNOTATE_LOCKS 14 #define __rte_lockable \ 15 __attribute__((lockable)) 17 #define __rte_guarded_by(...) \ 18 __attribute__((guarded_by(__VA_ARGS__))) 19 #define __rte_guarded_var \ 20 __attribute__((guarded_var)) 22 #define __rte_exclusive_locks_required(...) \ 23 __attribute__((exclusive_locks_required(__VA_ARGS__))) 24 #define __rte_exclusive_lock_function(...) \ 25 __attribute__((exclusive_lock_function(__VA_ARGS__))) 26 #define __rte_exclusive_trylock_function(ret, ...) \ 27 __attribute__((exclusive_trylock_function(ret, __VA_ARGS__))) 28 #define __rte_assert_exclusive_lock(...) \ 29 __attribute__((assert_exclusive_lock(__VA_ARGS__))) 31 #define __rte_shared_locks_required(...) \ 32 __attribute__((shared_locks_required(__VA_ARGS__))) 33 #define __rte_shared_lock_function(...) \ 34 __attribute__((shared_lock_function(__VA_ARGS__))) 35 #define __rte_shared_trylock_function(ret, ...) \ 36 __attribute__((shared_trylock_function(ret, __VA_ARGS__))) 37 #define __rte_assert_shared_lock(...) \ 38 __attribute__((assert_shared_lock(__VA_ARGS__))) 40 #define __rte_unlock_function(...) \ 41 __attribute__((unlock_function(__VA_ARGS__))) 43 #define __rte_locks_excluded(...) \ 44 __attribute__((locks_excluded(__VA_ARGS__))) 46 #define __rte_no_thread_safety_analysis \ 47 __attribute__((no_thread_safety_analysis)) 51 #define __rte_lockable 53 #define __rte_guarded_by(...) 54 #define __rte_guarded_var 56 #define __rte_exclusive_locks_required(...) 57 #define __rte_exclusive_lock_function(...) 58 #define __rte_exclusive_trylock_function(...) 59 #define __rte_assert_exclusive_lock(...) 61 #define __rte_shared_locks_required(...) 62 #define __rte_shared_lock_function(...) 63 #define __rte_shared_trylock_function(...) 64 #define __rte_assert_shared_lock(...) 66 #define __rte_unlock_function(...) 68 #define __rte_locks_excluded(...) 70 #define __rte_no_thread_safety_analysis