#include <atomic.hpp>
|
| AtomicCounter (IntegralCounterType initialValue_=0) |
| Constructor. More...
|
|
void | increment (IntegralCounterType val=1) |
| Increment of the counter. More...
|
|
void | decrement (IntegralCounterType val=1) |
| Decrement of the counter. More...
|
|
IntegralCounterType | allocIncrement (IntegralCounterType val=1) |
| Increment of the counter. More...
|
|
IntegralCounterType | value () const |
| Increment of the counter. More...
|
|
void | set (const IntegralCounterType &val) |
| Initialization of the counter. More...
|
|
bool | test_and_set (IntegralCounterType testval, IntegralCounterType newval) |
| Compare current value with 'testval', change it to 'newval' if matches. More...
|
|
| atomic (IntegralCounterTypevalue) |
|
| atomic (const atomic &o) |
|
template<typename IntegralCounterType >
template<typename IntegralCounterType >
IntegralCounterType strus::AtomicCounter< IntegralCounterType >::allocIncrement |
( |
IntegralCounterType |
val = 1 | ) |
|
|
inline |
Increment of the counter.
- Returns
- the new value of the counter after the increment operation
template<typename IntegralCounterType >
Decrement of the counter.
template<typename IntegralCounterType >
Increment of the counter.
template<typename IntegralCounterType >
Initialization of the counter.
- Parameters
-
[in] | val | the value of the counter |
template<typename IntegralCounterType >
bool strus::AtomicCounter< IntegralCounterType >::test_and_set |
( |
IntegralCounterType |
testval, |
|
|
IntegralCounterType |
newval |
|
) |
| |
|
inline |
Compare current value with 'testval', change it to 'newval' if matches.
- Parameters
-
[in] | testval | the value of the counter |
[in] | newval | the value of the counter |
- Returns
- true on success
template<typename IntegralCounterType >
Increment of the counter.
- Returns
- the current value of the counter
The documentation for this class was generated from the following file:
- /home/patrick/Projects/github/strusBase/include/strus/base/atomic.hpp