UHD
003.005.005-0-g3c6a906c
|
A 32-bit integer that can be atomically accessed. More...
#include <atomic.hpp>
Public Member Functions | |
UHD_INLINE | atomic_uint32_t (void) |
Create a new atomic 32-bit integer, initialized to zero. More... | |
UHD_INLINE boost::uint32_t | cas (boost::uint32_t newval, boost::uint32_t cmp) |
Compare with cmp, swap with newval if same, return old value. More... | |
UHD_INLINE void | write (const boost::uint32_t newval) |
Sets the atomic integer to a new value. More... | |
UHD_INLINE boost::uint32_t | read (void) |
Gets the current value of the atomic integer. More... | |
UHD_INLINE boost::uint32_t | inc (void) |
Increment by 1 and return the old value. More... | |
UHD_INLINE boost::uint32_t | dec (void) |
Decrement by 1 and return the old value. More... | |
A 32-bit integer that can be atomically accessed.
|
inline |
Create a new atomic 32-bit integer, initialized to zero.
|
inline |
Compare with cmp, swap with newval if same, return old value.
|
inline |
Decrement by 1 and return the old value.
|
inline |
Increment by 1 and return the old value.
|
inline |
Gets the current value of the atomic integer.
|
inline |
Sets the atomic integer to a new value.