rpa::cas2_mutex< Iter1, Iter2, Mutex > Struct Template Reference

Emulates a double compare-and-swap with a mutex. More...

#include <cas.h>

Inheritance diagram for rpa::cas2_mutex< Iter1, Iter2, Mutex >:

rpa::cas2< const Type *, RPA_LIST_ITERATOR(Type) > rpa::cas2< const Type *, size_t > rpa::cas2< RPA_LIST_ITERATOR_CONST(Type), RPA_LIST_ITERATOR(Type) > rpa::cas2< RPA_LIST_ITERATOR_CONST(Type), size_t > rpa::cas2< RPA_SET_ITERATOR_CONST(Type), size_t > rpa::cas2< RPA_VECTOR_ITERATOR_CONST(Type, Alloc), size_t > rpa::cas2< RPA_VECTOR_ITERATOR_CONST(Type, std::allocator< Type >), RPA_LIST_ITERATOR(Type) > List of all members.

Static Public Member Functions

static bool cas (typename atomic< Iter1 >::atomic_type *It1Ptr, Iter1 It1Old, Iter1 It1New, typename atomic< Iter2 >::atomic_type *It2Ptr, Iter2 It2Old, Iter2 It2New)

Static Public Attributes

static Mutex sttMtx

Detailed Description

template<class Iter1, class Iter2, class Mutex>
struct rpa::cas2_mutex< Iter1, Iter2, Mutex >

Emulates a double compare-and-swap with a mutex.

Allows to implement a CompareAndSwap even for iterators which have no support for atomic operations, by simulating them with a mutex. This is for testing purpose, because there is no performance benefit.


Member Function Documentation

template<class Iter1, class Iter2, class Mutex>
static bool rpa::cas2_mutex< Iter1, Iter2, Mutex >::cas ( typename atomic< Iter1 >::atomic_type *  It1Ptr,
Iter1  It1Old,
Iter1  It1New,
typename atomic< Iter2 >::atomic_type *  It2Ptr,
Iter2  It2Old,
Iter2  It2New 
) [inline, static]


Member Data Documentation

template<class Iter1, class Iter2, class Mutex>
Mutex rpa::cas2_mutex< Iter1, Iter2, Mutex >::sttMtx [static]


The documentation for this struct was generated from the following file:
Generated on Tue Sep 25 10:20:34 2007 for rpa by  doxygen 1.4.7