Firmware
|
Provides atomic integers and counters. More...
Go to the source code of this file.
Provides atomic integers and counters.
Each method is executed atomically and thus can be used to prevent data races and add memory synchronization between threads.
In addition to the atomicity, each method serves as a memory barrier (sequential consistent ordering). This means all operations that happen before and could potentially have visible side-effects in other threads will happen before the method is executed.
The implementation uses the built-in methods from GCC (supported by Clang as well).