base::Atomic Class Reference

Atomic operations. More...

#include <base_thread_atomic.hh>

Inheritance diagram for base::Atomic:

base::FastLock base::RushLock

List of all members.

Public Types

typedef volatile int Bool
typedef volatile int Int
typedef volatile long Long

Public Member Functions

 Atomic (void)
 ~Atomic ()
CLASS_METHOD void Set (Int *out, Int val)
CLASS_METHOD Int Add (Int *sum, Int addend)
CLASS_METHOD Int Xchg (Int *ptr, Int val)
CLASS_METHOD void Set (Long *out, Long val)
CLASS_METHOD Long Add (Long *sum, Long addend)
CLASS_METHOD Long Xchg (Long *ptr, Long val)
CLASS_METHOD void Set (volatile pthread_t *out, volatile pthread_t val)


Detailed Description

Atomic operations.

Member Typedef Documentation

typedef volatile int base::Atomic::Bool

typedef volatile int base::Atomic::Int

typedef volatile long base::Atomic::Long


Constructor & Destructor Documentation

base::Atomic::Atomic ( void   )  [inline]

base::Atomic::~Atomic (  )  [inline]


Member Function Documentation

CLASS_METHOD void base::Atomic::Set ( Int out,
Int  val 
) [inline]

Atomically assign a variable.

CLASS_METHOD Int base::Atomic::Add ( Int sum,
Int  addend 
) [inline]

Atomically add a variable.

CLASS_METHOD Int base::Atomic::Xchg ( Int ptr,
Int  val 
) [inline]

Atomic exchange. atomic { old = *ptr; *ptr = val; return old }

CLASS_METHOD void base::Atomic::Set ( Long out,
Long  val 
) [inline]

Atomically assign a variable.

CLASS_METHOD Long base::Atomic::Add ( Long sum,
Long  addend 
) [inline]

Atomically add a variable.

CLASS_METHOD Long base::Atomic::Xchg ( Long ptr,
Long  val 
) [inline]

Atomic exchange. atomic { old = *ptr; *ptr = val; return old }

CLASS_METHOD void base::Atomic::Set ( volatile pthread_t *  out,
volatile pthread_t  val 
) [inline]

May not be truly atomic if pthread_t is a complex struct instead of an int.


The documentation for this class was generated from the following file: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:19 2007