Mintomic’s lock-free API is a single set of functions for lock-free programming which works on a variety of platforms. It’s implemented in pure C, mainly as a set of header files.
To use the lock-free API in your project, simply add the top-level
include/ folder to your include path, and include
<mintomic/mintomic.h>. More information can be found in the following subsections:
Mintomic relies on the compiler to make certain guarantees about the underlying memory model.
Mintomic has its own internal set of core definitions, including portable integer types, compiler attributes and convenience functions. You can include it directly via
Mintomic provides atomic data types such as
mint_atomic32_t, and portable 32- and 64-bit variants of common atomic operations such as
mint_compare_exchange_32_relaxed. In Mintomic, all atomic operations use relaxed memory ordering constraints.
The only way to enforce memory ordering in Mintomic is by issuing an explicit fence instruction. Different instructions apply different ordering constraints, such as