Skip to content

File thread_safety_annotations.hpp

FileList > include > nebula_core_common > util > thread_safety_annotations.hpp

Go to the source code of this file

More...

Macros

Type Name
define NEBULA_TSA_ATTRIBUTE (x)
define NEBULA_TSA_GUARDED_BY (x) [**NEBULA\_TSA\_ATTRIBUTE**](thread__safety__annotations_8hpp.md#define-nebula_tsa_attribute)(guarded\_by(x))
The annotated member may only be accessed while holding the given mutex.
define NEBULA_TSA_REQUIRES (...) [**NEBULA\_TSA\_ATTRIBUTE**](thread__safety__annotations_8hpp.md#define-nebula_tsa_attribute)(requires\_capability(\_\_VA\_ARGS\_\_))
The annotated function may only be called while holding the given mutexes.

Detailed Description

Clang thread safety annotations, see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html. They are only active with Clang and a standard library whose mutexes are annotated (libc++), and expand to nothing otherwise.

Macro Definition Documentation

define NEBULA_TSA_ATTRIBUTE

#define NEBULA_TSA_ATTRIBUTE (
    x
) 

define NEBULA_TSA_GUARDED_BY

The annotated member may only be accessed while holding the given mutex.

#define NEBULA_TSA_GUARDED_BY (
    x
) `NEBULA_TSA_ATTRIBUTE (guarded_by(x))`


define NEBULA_TSA_REQUIRES

The annotated function may only be called while holding the given mutexes.

#define NEBULA_TSA_REQUIRES (
    ...
) `NEBULA_TSA_ATTRIBUTE (requires_capability(__VA_ARGS__))`



The documentation for this class was generated from the following file src/nebula_core/nebula_core_common/include/nebula_core_common/util/thread_safety_annotations.hpp