Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <[email protected]>
  • Loading branch information
Emerson Knapp committed Mar 8, 2019
1 parent 888493c commit 31b92f8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 15 additions & 4 deletions README.md
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`
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 31b92f8

Please sign in to comment.