Wrapper around integral type to make all operations atomic and sequentially consistent.
More...
|
| | Atomic ()=default |
| |
| | Atomic (T val) |
| |
| | Atomic (const Atomic &val) |
| |
| T | operator= (T val) volatile |
| | Assign value. More...
|
| |
| T | operator= (const Atomic &val) volatile |
| |
| T | operator++ () volatile |
| | Pre-increment, returns new value. More...
|
| |
| T | operator++ (int) volatile |
| | Post-increment, returns initial value. More...
|
| |
| T | operator-- () volatile |
| | Pre-decrement, returns new value. More...
|
| |
| T | operator-- (int) volatile |
| | Post-decrement, returns initial value. More...
|
| |
| T | operator+= (T rhs) volatile |
| | Add and return new value. More...
|
| |
| T | operator-= (T rhs) volatile |
| | Sub and return new value. More...
|
| |
| T | operator&= (T rhs) volatile |
| | And and return new value. More...
|
| |
| T | operator|= (T rhs) volatile |
| | Or and return new value. More...
|
| |
| T | operator^= (T rhs) volatile |
| | Xor and return new value. More...
|
| |
| | operator T () const volatile |
| | Read value. More...
|
| |
| void | store (T val, Order o=Order::seqCst) volatile |
| |
| T | load (Order o=Order::seqCst) const volatile |
| |
| T | add (T rhs, Order o=Order::seqCst) volatile |
| |
| T | sub (T rhs, Order o=Order::seqCst) volatile |
| |
| T | and_ (T rhs, Order o=Order::seqCst) volatile |
| |
| T | or_ (T rhs, Order o=Order::seqCst) volatile |
| |
| T | xor_ (T rhs, Order o=Order::seqCst) volatile |
| |
| bool | cas (T newVal, T cmp, Order o=Order::seqCst) volatile |
| | Compare and swap. If atomic is equal to comparand cmp then atomic is assigned to newVal and true is returned. Returns false otherwise. More...
|
| |
template<class T>
class honey::Atomic< T, true >
Wrapper around integral type to make all operations atomic and sequentially consistent.