Skip to content

Commit

Permalink
WIP Merge touch-up
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Cousineau <[email protected]>
  • Loading branch information
EricCousineau-TRI committed Apr 2, 2019
1 parent bb0f065 commit 3e95f2a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ See below sections for what this package currently contains.

## Clang Thread Safety Annotation Macros

The `rcpputils/thread_safety_annotations.hpp` header provides macros for Clang's [Thread Safety Analysis](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) feature.
In [`rcpputils/thread_safety_annotations.hpp`](./include/rcpputils/thread_safety_annotations.hpp), there are 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`

## Library Discovery
Expand Down

0 comments on commit 3e95f2a

Please sign in to comment.