The Pedigree Project  0.1
Public Member Functions | List of all members
Atomic< bool, true > Class Template Reference

#include <Atomic.h>

+ Inheritance diagram for Atomic< bool, true >:
+ Collaboration diagram for Atomic< bool, true >:

Public Member Functions

 Atomic (bool value=false)
 
 Atomic (const Atomic &x)
 
Atomicoperator= (const Atomic &x)
 
virtual ~Atomic ()
 
bool operator|= (bool x)
 
bool operator&= (bool x)
 
bool operator^= (bool x)
 
bool compareAndSwap (bool oldVal, bool newVal)
 
 operator bool () const
 

Detailed Description

template<>
class Atomic< bool, true >

Wrapper around gcc's builtin atomic operations

Definition at line 158 of file Atomic.h.

Constructor & Destructor Documentation

Atomic< bool, true >::Atomic ( bool  value = false)
inline

The constructor

Parameters
[in]valueinitial value

Definition at line 163 of file Atomic.h.

Atomic< bool, true >::Atomic ( const Atomic< bool, true > &  x)
inline

The copy-constructor

Parameters
[in]xreference object

Definition at line 168 of file Atomic.h.

Atomic< bool, true >::~Atomic ( )
virtual

The destructor does nothing

Definition at line 23 of file Atomic.cc.

Member Function Documentation

bool Atomic< bool, true >::compareAndSwap ( bool  oldVal,
bool  newVal 
)
inline

Compare and swap

Parameters
[in]oldValthe comparision value
[in]newValthe new value
Returns
true, if the Atomic had the value oldVal and the value was changed to newVal, false otherwise

Definition at line 207 of file Atomic.h.

Atomic< bool, true >::operator bool ( ) const
inline

Get the value

Returns
the value of the Atomic

Definition at line 214 of file Atomic.h.

bool Atomic< bool, true >::operator&= ( bool  x)
inline

Bitwise and

Parameters
[in]xthe operand
Returns
the value after the bitwise and

Definition at line 191 of file Atomic.h.

Atomic& Atomic< bool, true >::operator= ( const Atomic< bool, true > &  x)
inline

The assignment operator

Parameters
[in]xreference object

Definition at line 173 of file Atomic.h.

bool Atomic< bool, true >::operator^= ( bool  x)
inline

Bitwise xor

Parameters
[in]xthe operand
Returns
the value after the bitwise xor

Definition at line 198 of file Atomic.h.

bool Atomic< bool, true >::operator|= ( bool  x)
inline

Bitwise or

Parameters
[in]xthe operand
Returns
the value after the bitwise or

Definition at line 184 of file Atomic.h.


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