|
CX Framework
Cross-platform C utility framework
|
Cross-platform atomic operations, memory barriers, and CPU intrinsics. This module provides:
The implementation is selected at compile time based on the compiler:
<intrin.h> and MSVC intrinsicsAtomic Types: Use the atomic(type) macro to declare atomic variables:
Memory Ordering:
Relaxed - No synchronization or ordering constraintsAcquire - Prevents reordering of subsequent loads/stores before this operationRelease - Prevents reordering of previous loads/stores after this operationAcqRel - Combination of Acquire and ReleaseSeqCst - Sequentially consistent ordering (strongest guarantee)Common Operations:
See the compiler-specific headers for the complete API.