rpa::atomic_condition< Mutex, AtomicBool > Class Template Reference

#include <atomic_condition.h>

List of all members.

Public Types

typedef Mutex mutex_type

Public Member Functions

 atomic_condition (Mutex *mtxPtr, size_t nbLoops=1)
void wait (void)
 This will always work because this cannot loop forever.
void signal (void)

Private Attributes

Mutex * _mtx_cond
AtomicBool::type _state
size_t _nbLoops


Detailed Description

template<class Mutex, class AtomicBool>
class rpa::atomic_condition< Mutex, AtomicBool >

Very poor implementation, if no condition variable is available. This needs a real mutex, otherwise the condition variable would not be protected. The point into using an atomic boolean, is that we need a memory barrier.


Member Typedef Documentation

template<class Mutex, class AtomicBool>
typedef Mutex rpa::atomic_condition< Mutex, AtomicBool >::mutex_type


Constructor & Destructor Documentation

template<class Mutex, class AtomicBool>
rpa::atomic_condition< Mutex, AtomicBool >::atomic_condition ( Mutex *  mtxPtr,
size_t  nbLoops = 1 
) [inline]


Member Function Documentation

template<class Mutex, class AtomicBool>
void rpa::atomic_condition< Mutex, AtomicBool >::signal ( void   )  [inline]

template<class Mutex, class AtomicBool>
void rpa::atomic_condition< Mutex, AtomicBool >::wait ( void   )  [inline]

This will always work because this cannot loop forever.


Member Data Documentation

template<class Mutex, class AtomicBool>
Mutex* rpa::atomic_condition< Mutex, AtomicBool >::_mtx_cond [private]

template<class Mutex, class AtomicBool>
size_t rpa::atomic_condition< Mutex, AtomicBool >::_nbLoops [private]

template<class Mutex, class AtomicBool>
AtomicBool::type rpa::atomic_condition< Mutex, AtomicBool >::_state [private]


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