A shared unsigned 32-bit integer class. More...
#include <util.h>
Public Member Functions | |
uint32_t | operator() () const |
Read the current value. | |
uint32_t | operator++ () |
Increment operator. | |
void | operator+= (const uint32_t rhs) |
In-place addition operator. | |
uint32_t | operator-- () |
Decrement operator. | |
void | operator-= (const uint32_t rhs) |
In-place subtraction operator. | |
A shared unsigned 32-bit integer class.
Multiply threads may safely perform different operations on this integer at the same time. It serializes the operations by using the atomic operations provided by GCC extension. The availability of automic operations is indicated by whether or not the compiler macro HAVE_GCC_ATOMIC32 is defined. If the atomic extension is not available, it falls back on the mutual exclusion lock provided by pthread library.