![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
The mutex subpackage provides backports of the content of <mutex> from newer C++ versions, as well as providing thin wrappers around std::mutex, std::timed_mutex, and std::lock_guard suitable for use with Thread Safety Analysis.
The public header is
The Bazel target is
In order for TSA to function correctly, synchronization primitives need to be annotated as capabilities. libcxx provides appropriately annotated capabilities directly in <mutex>, but for other stdlib implementations they must be provided manually. To support this, the following annotated types are provided:
arene::base::mutex: annotated std::mutexarene::base::timed_mutex: annotated std::timed_mutexarene::base::lock_guard: annotated std::lock_guardTheir usage is identical to their stdlib equivalents.
libcxx, these types become simple aliases to their stdlib counterparts to improve compile times.