qpid::sys::AtomicValue< T > Class Template Reference

Atomic value of type T. More...

#include <AtomicValue_gcc.h>

Inheritance diagram for qpid::sys::AtomicValue< T >:

Inheritance graph
[legend]
Collaboration diagram for qpid::sys::AtomicValue< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AtomicValue (T init=0)
operator+= (T n)
operator-= (T n)
operator++ ()
operator-- ()
fetchAndAdd (T n)
fetchAndSub (T n)
operator++ (int)
operator-- (int)
valueCompareAndSwap (T testval, T newval)
 If current value == testval then set to newval.
bool boolCompareAndSwap (T testval, T newval)
 If current value == testval then set to newval.
get () const
 AtomicValue (T init=0)
operator+= (T n)
operator-= (T n)
operator++ ()
operator-- ()
fetchAndAdd (T n)
fetchAndSub (T n)
operator++ (int)
operator-- (int)
valueCompareAndSwap (T testval, T newval)
 If current value == testval then set to newval.
bool boolCompareAndSwap (T testval, T newval)
 If current value == testval then set to newval.
get () const


Detailed Description

template<class T>
class qpid::sys::AtomicValue< T >

Atomic value of type T.

T must be an integral type of size 1,2,4 or 8 bytes. All operations are atomic and preform a full memory barrier unless otherwise noted.

Definition at line 37 of file AtomicValue_gcc.h.


Member Function Documentation

template<class T>
T qpid::sys::AtomicValue< T >::valueCompareAndSwap ( testval,
newval 
) [inline]

If current value == testval then set to newval.

Returns the old value.

Definition at line 55 of file AtomicValue_gcc.h.

template<class T>
bool qpid::sys::AtomicValue< T >::boolCompareAndSwap ( testval,
newval 
) [inline]

If current value == testval then set to newval.

Returns true if the swap was performed.

Definition at line 58 of file AtomicValue_gcc.h.

template<class T>
T qpid::sys::AtomicValue< T >::valueCompareAndSwap ( testval,
newval 
) [inline]

If current value == testval then set to newval.

Returns the old value.

Definition at line 57 of file AtomicValue_mutex.h.

template<class T>
bool qpid::sys::AtomicValue< T >::boolCompareAndSwap ( testval,
newval 
) [inline]

If current value == testval then set to newval.

Returns true if the swap was performed.

Definition at line 65 of file AtomicValue_mutex.h.


The documentation for this class was generated from the following files:

Generated on Thu Oct 16 13:38:38 2008 for Qpid by  doxygen 1.5.6