atomic object toolkitA templated class for creating atomic numbers. More...
#include <atomic.hpp>
Public Member Functions | |
| atomic (const T &value=0) | |
| Creates an atomic number with value "value". | |
| T | inc () |
| Performs an atomic increment by 1, returning the new value. | |
| T | dec () |
| Performs an atomic decrement by 1, returning the new value. | |
| T | inc (T val) |
| Performs an atomic increment by 'val', returning the new value. | |
| T | dec (T val) |
| Performs an atomic decrement by 'val', returning the new value. | |
| T | inc_ret_last () |
| Performs an atomic increment by 1, returning the old value. | |
| T | dec_ret_last () |
| Performs an atomic decrement by 1, returning the old value. | |
| T | inc_ret_last (T val) |
| Performs an atomic increment by 'val', returning the old value. | |
| T | dec_ret_last (T val) |
| Performs an atomic decrement by 'val', returning the new value. | |
Public Attributes | |
| volatile T | value |
| The current value of the atomic number. | |
atomic object toolkit
A templated class for creating atomic numbers.
Definition at line 30 of file atomic.hpp.
1.7.1