< Atomic 32-bit integer
More...
#include <atomics.hpp>
|
| AtomicInt (int32_t init=0) noexcept |
| Initialize atomic integer.
|
|
int32_t | get () const noexcept |
| Returns value of atomic integer.
|
|
int32_t | set (int32_t newvalue) noexcept |
| Updates atomic integer to a new value and returns it previous value.
|
|
int32_t | changeIf (int32_t comparand, int32_t newvalue) noexcept |
| Compares atomic integer with comparand and set its to newvalue if they match, returns previous value.
|
|
bool_t | updateIf (int32_t fromvalue, int32_t tovalue) noexcept |
| Returns true if update from fromvalue to tovalue was successful.
|
|
int32_t | operator++ () noexcept |
| Increments atomic integer and returns its current value.
|
|
int32_t | operator++ (int) noexcept |
| Increments atomic integer and returns its previous value.
|
|
int32_t | operator-- () noexcept |
| Decrements atomic integer and returns its current value.
|
|
int32_t | operator+= (int32_t value) noexcept |
| Adds number to atomic integer and returns its updated value.
|
|
int32_t | operator-= (int32_t value) noexcept |
| Substracts number to atomic integer and returns its updated value.
|
|
The documentation for this class was generated from the following files: