-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emerson Knapp <[email protected]>
- Loading branch information
Emerson Knapp
committed
Mar 8, 2019
1 parent
888493c
commit 31b92f8
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
# rcpputils: ROS 2 C++ Utilities | ||
|
||
`rcpputils` is a C++ API consisting of macros, functions, and data structures used through out the ROS 2 code base. | ||
`rcpputils` is a C++ API consisting of macros, functions, and data structures intended for use throughout the ROS 2 codebase | ||
|
||
The API is a combination of parts: | ||
This package currently contains: | ||
* Clang thread safety annotation macros | ||
|
||
- Macros for clang compiler's thread safety analysis | ||
- rcpputils/thread_safety_annotations.h | ||
## Clang Thread Safety Annotation Macros | ||
the `rcpputils/thread_safety_annotations.h` header provides macros for Clang's [Thread Safety Analysis](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) feature. | ||
|
||
The macros allow you to annotate your code, but expand to nothing when using a non-clang compiler, so they are safe for cross-platform use. | ||
|
||
To use thread safety annotation in your package (in the Clang build only), enable the `-Wthread-safety` compiler flag, and include the header | ||
|
||
``` | ||
#include "rcpputils/thread_safety_annotations.h" | ||
``` | ||
|
||
For example usage, see [the documentation of this feature](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) and the tests in `test/test_basic.cpp` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<package format="2"> | ||
<name>rcpputils</name> | ||
<version>0.1.0</version> | ||
<description>Package containing various utility types and functions for C++</description> | ||
<description>Package containing utility code for C++. Currently only Clang thread safety annotation macros</description> | ||
<maintainer email="[email protected]">Emerson Knapp</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
|