base_thread_atomic.hh File Reference

Thread support: atomic operations. More...

#include "base_thread_common.hh"
#include "base_thread_atomic2.hh"

Go to the source code of this file.

Namespaces

namespace  base

Classes

class  base::Atomic
 Atomic operations. More...
class  base::Busy
 Class to automatically increment and decrement a busy count. More...

Defines

#define BASE_THREAD_ATOMIC_HH   1
#define ATOMIC_TYPE   Int
#define ATOMIC_TYPE   Long
#define BUSY_BEGIN
#define BUSY_BEGIN_ASSERT
#define BUSY_END


Detailed Description

Thread support: atomic operations.

Id
LastChangedDate

Author:
Jim E. Brooks http://www.palomino3d.org
 * ----------------------------------------------------------------------------
 *
 * Atomic::Int,Long,Bool
 * Atomic types.
 *
 * Atomic::Set( out, val )
 * Atomic store.
 *
 * Atomic::Add( sum*, addend )
 * Atomic add.
 *
 * Atomic::Xchg( ptr, val )
 * Atomic exchange operation to support spinlocks.
 *
 * ----------------------------------------------------------------------------
 *
 * Assembly language is used for maximum speed and for compatibility
 * with gcc 3.4 which lacks atomic builtins.
 *
 * 
Id
LastChangedDate

Author:
Jim E. Brooks http://www.palomino3d.org

Define Documentation

#define ATOMIC_TYPE   Long

#define ATOMIC_TYPE   Int

#define BASE_THREAD_ATOMIC_HH   1

#define BUSY_BEGIN

Value:

PERSISTENT Atomic::Int sBusy = 0;    \
                            Busy busy( &sBusy );                 \
                            if ( busy.IfBusy() ) return;

#define BUSY_BEGIN_ASSERT

Value:

PERSISTENT Atomic::Int sBusy = 0;    \
                            Busy busy ( &sBusy );                \
                            ASSERT_OR_RETURN( not busy.IfBusy() );

#define BUSY_END

Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:14 2007