|
Hint 0.1.0
|
these are supported by -Wthread-safety
More...
Macros | |
| #define | hint_no_thread_safety_analysis |
| #define | hint_lockable |
| #define | hint_scoped_lockable |
| #define | hint_guarded_var |
| #define | hint_pt_guarded_var |
| #define | hint_guarded_by(x) |
| #define | hint_pt_guarded_by(x) |
| #define | hint_acquired_before(...) |
| #define | hint_acquired_after(...) |
| #define | hint_exclusive_lock_function(...) |
| #define | hint_shared_trylock_function(...) |
| #define | hint_unlock_function(...) |
| #define | hint_lock_returned(__x) |
| #define | hint_locks_excluded(...) |
| #define | hint_exclusive_locks_required(...) |
| #define | hint_shared_locks_required(...) |
these are supported by -Wthread-safety
| #define hint_acquired_after | ( | ... | ) |
Use on a declaration of a lockable variable to specify that the lock must be acquired after all attribute arguments. Arguments must be lockable type, and there must be at least one argument.
| #define hint_acquired_before | ( | ... | ) |
Use on a declaration of a lockable variable to specify that the lock must be acquired before all attribute arguments. Arguments must be lockable type, and there must be at least one argument.
| #define hint_exclusive_lock_function | ( | ... | ) |
Use on a function declaration to specify that the function acquires all listed locks exclusively. This attribute takes zero or more arguments: either of lockable type or integers indexing into function parameters of lockable type. If no arguments are given, the acquired lock is implicitly that of the enclosing object.
| #define hint_exclusive_locks_required | ( | ... | ) |
Use on a function declaration to specify that the function must be called while holding the listed exclusive locks. Arguments must be lockable type, and there must be at least one argument.
| #define hint_guarded_by | ( | x | ) |
Use on a variable declaration to specify that the variable must be accessed while holding lock l.
| #define hint_guarded_var |
Use on a variable declaration to specify that the variable must be accessed while holding some lock.
| #define hint_lock_returned | ( | __x | ) |
Use on a function declaration to specify that the function returns lock l (l must be of lockable type). This annotation is used to aid in resolving lock expressions.
| #define hint_lockable |
Use on a class definition to specify that it has a lockable type (e.g. a Mutex class). This annotation is primarily used to check consistency.
| #define hint_locks_excluded | ( | ... | ) |
Use on a function declaration to specify that the function must not be called with the listed locks. Arguments must be lockable type, and there must be at least one argument.
| #define hint_no_thread_safety_analysis |
Use on a function declaration to specify that the thread safety analysis should not be run on that function. This attribute provides an escape hatch (e.g. for situations when it is difficult to annotate the locking policy).
| #define hint_pt_guarded_by | ( | x | ) |
Use on a pointer declaration to specify that the pointer must be dereferenced while holding lock l.
| #define hint_pt_guarded_var |
Use on a pointer declaration to specify that the pointer must be dereferenced while holding some lock.
| #define hint_scoped_lockable |
Use on a class definition to specify that it has a “scoped” lockable type. Objects of this type will acquire the lock upon construction and release it upon going out of scope. This annotation is primarily used to check consistency.
| #define hint_shared_locks_required | ( | ... | ) |
Use on a function declaration to specify that the function must be called while holding the listed shared locks. Arguments must be lockable type, and there must be at least one argument.
| #define hint_shared_trylock_function | ( | ... | ) |
Use on a function declaration to specify that the function will try (without blocking) to acquire all listed locks, although the locks may be shared (e.g. read locks). This attribute takes one or more arguments. The first argument is an integer or boolean value specifying the return value of a successful lock acquisition. The remaining arugments are either of lockable type or integers indexing into function parameters of lockable type. If only one argument is given, the acquired lock is implicitly this of the enclosing object.
| #define hint_unlock_function | ( | ... | ) |
Use on a function declaration to specify that the function releases all listed locks. This attribute takes zero or more arguments: either of lockable type or integers indexing into function parameters of lockable type. If no arguments are given, the acquired lock is implicitly this of the enclosing object.