atomic_t Class Reference

#include "Pt/Atomicity.h"

Atomic integers to be used with atomicity functions.

Public Member Functions

 atomic_t (int v=0)
 Construct with initial value.
 

Related Functions

int atomicCompareExchange (volatile atomic_t &val, int exch, int comp)
 Performs an atomic compare-and-exchange operation. More...
 
void * atomicCompareExchange (void *volatile &val, void *exch, void *comp)
 Performs an atomic compare-and-exchange operation. More...
 
int atomicDecrement (volatile atomic_t &val)
 Decreases a value by one as an atomic operation. More...
 
int atomicExchange (volatile atomic_t &val, int exch)
 Performs an atomic exchange operation. More...
 
void * atomicExchange (void *volatile &val, void *exch)
 Performs an atomic exchange operation. More...
 
int atomicExchangeAdd (volatile atomic_t &val, int add)
 Performs atomic addition of two values. More...
 
int atomicGet (volatile atomic_t &val)
 Atomically get a value. More...
 
int atomicIncrement (volatile atomic_t &val)
 Increases a value by one as an atomic operation. More...
 
void atomicSet (volatile atomic_t &val, int n)
 Atomically set a value. More...