DUNE: Uniform Navigational Environment
2019.02.1
|
Simple counter with atomic operations.
Public Member Functions | |
AtomicCounter (int value=0) | |
int | add (int value) |
int | sub (int value) |
|
inline |
Constructor.
value | initial counter value. |
|
inline |
Atomically add a number to the current value and return the result.
value | number to add. |
|
inline |
Atomically subtract a number to the current value and return the result.
value | number to subtract. |