This library aims to implement an equivalent to the C11 atomics library. It's intended to be used as a way to enable the use of atomics in a mostly consistent manner to modern C, while still enabling compatibility with older compilers.
This fork is WIP for an drop-in replacement to C11 atomics.
For general usage on how to use, see Chapter 40 Atomics in Beej's Guide to C Programming, An Introduction to Lock-Free Programming, and Microsoft Windows: Atomic ops and memory barriers
This is a header-only library. Just add catomic.h
to your source tree and include it:
#include "catomic.h"