Public Member Functions

Raul::AtomicInt Class Reference
[Realtime Audio Utility Library]

Atomic integer. More...

#include <AtomicInt.hpp>

List of all members.

Public Member Functions

 AtomicInt (int val)
 AtomicInt (const AtomicInt &copy)
int get () const
void operator= (int val)
void operator+= (int val)
void operator-= (int val)
bool operator== (int val) const
int operator+ (int val) const
AtomicIntoperator++ ()
AtomicIntoperator-- ()
bool compare_and_exchange (int old, int val)
 Set value to val iff current value is old.
int exchange_and_add (int val)
 Add val to value.
bool decrement_and_test ()
 Decrement value.

Detailed Description

Atomic integer.

Member Function Documentation

bool Raul::AtomicInt::compare_and_exchange ( int  old,
int  val 
) [inline]

Set value to val iff current value is old.

true iff set succeeded.
int Raul::AtomicInt::exchange_and_add ( int  val  )  [inline]

Add val to value.

value immediately before addition took place.

Referenced by Raul::SRMWQueue< T >::push().

bool Raul::AtomicInt::decrement_and_test (  )  [inline]

Decrement value.

true if value is now 0, otherwise false.

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