GATE
|
#include <atomics.hpp>
Public Member Functions | |
AtomicInt64 (int64_t init=0) | |
AtomicInt64 (AtomicInt64 const &src) | |
AtomicInt64 & | operator= (AtomicInt64 const &src) |
int64_t | get () const |
int64_t | set (int64_t newvalue) |
int64_t | changeIf (int64_t comparand, int64_t newvalue) |
int64_t | operator++ () |
int64_t | operator++ (int) |
int64_t | operator-- () |
int64_t | operator-- (int) |
int64_t | operator+= (int64_t value) |
int64_t | operator-= (int64_t value) |
< Atomic 64-bit integer
gate::AtomicInt64::AtomicInt64 | ( | int64_t | init = 0 | ) |
Initialize atomic integer
int64_t gate::AtomicInt64::changeIf | ( | int64_t | comparand, |
int64_t | newvalue ) |
Compares atomic integer with comparand
and set its to newvalue
if they match, returns previous value
int64_t gate::AtomicInt64::get | ( | ) | const |
Returns value of atomic integer
int64_t gate::AtomicInt64::operator++ | ( | ) |
Increments atomic integer and returns its current value
int64_t gate::AtomicInt64::operator++ | ( | int | ) |
Increments atomic integer and returns its previous value
int64_t gate::AtomicInt64::operator+= | ( | int64_t | value | ) |
Adds number to atomic integer and returns its updated value
int64_t gate::AtomicInt64::operator-- | ( | ) |
Decrements atomic integer and returns its current value
int64_t gate::AtomicInt64::operator-- | ( | int | ) |
Decrements atomic integer and returns its previous value
int64_t gate::AtomicInt64::operator-= | ( | int64_t | value | ) |
Substracts number to atomic integer and returns its updated value
int64_t gate::AtomicInt64::set | ( | int64_t | newvalue | ) |
Updates atomic integer to a new value and returns it previous value