![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
Go to the source code of this file.
Provides a stable interface to clang's Thread Safety Annotations.
| #define ARENE_TSA_ACQUIRE | ( | ... | ) |
Annotates a function or method as acquiring exclusive access to the named capabilities before exit, without releasing them on exit.
| ... | A comma-separated list of the names of members/variables which provide the capabilities to be acquired. If omitted, assumed to be this . |
| #define ARENE_TSA_ACQUIRE_SHARED | ( | ... | ) |
Annotates a function or method as acquiring shared access to the named capabilities before exit, without releasing them on exit.
| ... | A comma-separated list of the names of members/variables which provide the capabilities to be acquired. If omitted, assumed to be this . |
| #define ARENE_TSA_ASSERT_CAPABILITY | ( | x | ) |
Annotates a function or method as asserting that the calling thread holds exclusive access to the named capability, and would terminate the process if it is not held.
| x | The name of the member or variable that provides the needed capability |
| #define ARENE_TSA_ASSERT_SHARED_CAPABILITY | ( | x | ) |
Annotates a function or method as asserting that the calling thread holds shared access to the named capability, and would terminate the process if it is not held.
| x | The name of the member or variable that provides the needed capability |
| #define ARENE_TSA_CAPABILITY | ( | x | ) |
Annotates a type as a "capability," which is a type that provides synchronization protection.
| x | The name of the type; used in generating error messages. |
| #define ARENE_TSA_EXCLUDES | ( | ... | ) |
Annotates a function or method as requiring the calling thread must not hold access to the named capabilities before entry.
| ... | A comma-separated list of the names of members/variables which provide the needed capabilities. |
| #define ARENE_TSA_GUARDED_BY | ( | x | ) |
Annotates a member as being guarded by a given capability.
| x | The name of the member which provides the capability that guards the annotated member |
| #define ARENE_TSA_NO_THREAD_SAFETY_ANALYSIS ARENE_THREAD_SAFETY_ANNOTATION_ATTRIBUTE_I_(no_thread_safety_analysis) |
Annotates a function or method as explicitly excluded from thread safety analysis.
| #define ARENE_TSA_PT_GUARDED_BY | ( | x | ) |
Annotates a member that is a (smart)pointer's pointed to content as being guarded by a given capability.
| x | The name of the member which provides the capability that guards the annotated pointer-member |
| #define ARENE_TSA_RELEASE | ( | ... | ) |
Annotates a function or method as releasing access to the named capabilities before exit. The calling thread must hold exclusive access to the named capabilities before entering.
| ... | A comma-separated list of the names of members/variables which provide the capabilities to be released. If omitted, assumed to be this . |
| #define ARENE_TSA_RELEASE_GENERIC | ( | ... | ) |
Annotates a function or method as releasing access to the named capabilities before exit. The calling thread can hold either exclusive or shared access to the named capabilities before entering.
| ... | A comma-separated list of the names of members/variables which provide the capabilities to be released. If omitted, assumed to be this . |
| #define ARENE_TSA_RELEASE_SHARED | ( | ... | ) |
Annotates a function or method as releasing access to the named capabilities before exit. The calling thread must hold shared access to the named capabilities before entering.
| ... | A comma-separated list of the names of members/variables which provide the capabilities to be released. If omitted, assumed to be this . |
| #define ARENE_TSA_REQUIRES | ( | ... | ) |
Annotates a function or method as needing the calling thread to hold exclusive access to the named capabilities before entering and after exit.
| ... | A comma-separated list of the names of members/variables which provide the needed capabilities. |
| #define ARENE_TSA_REQUIRES_SHARED | ( | ... | ) |
Annotates a function or method as needing the calling thread to hold shared access to the named capabilities before entering and after exit.
| ... | A comma-separated list of the names of members/variables which provide the needed capabilities. |
| #define ARENE_TSA_RETURN_CAPABILITY | ( | x | ) |
Annotates a function or method as returning a reference to the named capability.
| x | The name of the member or variable that provides the needed capability |
| #define ARENE_TSA_SCOPED_CAPABILITY ARENE_THREAD_SAFETY_ANNOTATION_ATTRIBUTE_I_(scoped_lockable) |
Annotates a type as a "scoped capability," which is a type that provides RAII synchronization protection.
| #define ARENE_TSA_TRY_ACQUIRE | ( | ... | ) |
Annotates a function or method as attempting to acquire exclusive access to the named capabilities before exit, without releasing them on exit, and returning a bool of success/failure.
| ... | A boolean value, followed by a comma-separated list of the names of members/variables which provide the capabilities to be acquired. The boolean value represents which boolean value represents "success" for the assertion. If the name of the capability(s) are omitted, the capability is assumed to be this . |
| #define ARENE_TSA_TRY_ACQUIRE_SHARED | ( | ... | ) |
Annotates a function or method as attempting to acquire shared access to the named capabilities before exit, without releasing them on exit, and returning a bool of success/failure.
| ... | A boolean value, followed by a comma-separated list of the names of members/variables which provide the capabilities to be acquired. The boolean value represents which boolean value represents "success" for the assertion. If the name of the capability(s) are omitted, the capability is assumed to be this . |