Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AtomicAdjust Class Reference

A suite of functions to atomically adjust a numeric value. More...

#include <atomicAdjust.h>

List of all members.

Static Public Member Functions

int inc (int &var)
 Atomically increments the indicated variable and returns the new value.

int dec (int &var)
 Atomically decrements the indicated variable and returns the new value.

int set (int &var, int new_value)
 Atomically changes the indicated variable and returns the original value.


Detailed Description

A suite of functions to atomically adjust a numeric value.

Some platforms require a bit more work than others to guarantee that a multibyte value is changed in one atomic operation.

Definition at line 41 of file atomicAdjust.h.


Member Function Documentation

int AtomicAdjust::dec int &  var  )  [inline, static]
 

Atomically decrements the indicated variable and returns the new value.

Definition at line 49 of file atomicAdjust.I.

References AtomicAdjustDummyImpl::set().

int AtomicAdjust::inc int &  var  )  [inline, static]
 

Atomically increments the indicated variable and returns the new value.

Definition at line 34 of file atomicAdjust.I.

References AtomicAdjustDummyImpl::dec(), and INLINE.

int AtomicAdjust::set int &  var,
int  new_value
[inline, static]
 

Atomically changes the indicated variable and returns the original value.

Definition at line 64 of file atomicAdjust.I.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:47:27 2003 for Panda by doxygen1.3