Atomic integer. More...
#include <AtomicInt.hpp>
Public Member Functions | |
AtomicInt (int val) | |
AtomicInt (const AtomicInt ©) | |
int | get () const |
void | operator= (int val) |
void | operator+= (int val) |
void | operator-= (int val) |
bool | operator== (int val) const |
int | operator+ (int val) const |
AtomicInt & | operator++ () |
AtomicInt & | operator-- () |
bool | compare_and_exchange (int old, int val) |
Set value to val iff current value is old. | |
int | exchange_and_add (int val) |
Add val to value. | |
bool | decrement_and_test () |
Decrement value. |
Atomic integer.
bool Raul::AtomicInt::compare_and_exchange | ( | int | old, | |
int | val | |||
) | [inline] |
Set value to val iff current value is old.
int Raul::AtomicInt::exchange_and_add | ( | int | val | ) | [inline] |
Add val to value.
Referenced by Raul::SRMWQueue< T >::push().
bool Raul::AtomicInt::decrement_and_test | ( | ) | [inline] |
Decrement value.