#include <atomic.h>
Inheritance diagram for rpa::atomic_mutex< Iter, Mutex >:
Public Types | |
typedef Iter | data_type |
Uses the name 'Iter' because iterators are the commonest template parameter. | |
Static Public Member Functions | |
static void | store (atomic_type &anIt, const data_type &aVal) |
Atomically stores the value into the atomic type, protected by the mutex. | |
static Iter | load (const atomic_type &anIt) |
static void | incr (atomic_type &anIt) |
static const Iter & | value (const atomic_type &anIt) |
Classes | |
class | atomic_type |
Atomic data type associated to 'Iter'. More... |
For example, for a complicated datatype. This is slow, but allows to compile, link and run. This is also a good platform for testing for race conditions, by changing the synchronization primitives, while retaining exactly the same scheme.
typedef Iter rpa::atomic_mutex< Iter, Mutex >::data_type |
Uses the name 'Iter' because iterators are the commonest template parameter.
static void rpa::atomic_mutex< Iter, Mutex >::incr | ( | atomic_type & | anIt | ) | [inline, static] |
static Iter rpa::atomic_mutex< Iter, Mutex >::load | ( | const atomic_type & | anIt | ) | [inline, static] |
static void rpa::atomic_mutex< Iter, Mutex >::store | ( | atomic_type & | anIt, | |
const data_type & | aVal | |||
) | [inline, static] |
Atomically stores the value into the atomic type, protected by the mutex.
static const Iter& rpa::atomic_mutex< Iter, Mutex >::value | ( | const atomic_type & | anIt | ) | [inline, static] |