base/Locks.h File Reference

Thread locking constructs and atomic functions. More...

#include "linux/Locks.h"

This graph shows which files directly or indirectly include this file:


Namespaces

namespace  MPMA

Classes

class  MPMA::RWSleepLock
 ReaderWriter sleep-lock (re-entrant safe). Read locks don't block each other out, but Write locks are exclusive to all other locks. More...
class  MPMA::TakeRWSleepLock
 Used to lock/unlock a RWSleepLock automatically using scope. The lock is released on dustruction. More...
class  MPMA::MutexLock
 Mutex (re-entrant safe). More...
class  MPMA::TakeMutexLock
 Used to lock/unlock a MutexLock automatically using scope. The lock is released on dustruction. More...
class  MPMA::SpinLock
 Spinlock (NOT re-entrant safe) that reverts to a sleeplock on single cpu systems. If no lock-contention occurs, these is extremely little overhead in use. More...
class  MPMA::TakeSpinLock
 Used to lock/unlock a spinlock automatically using scope. The lock is released on destruction. More...
class  MPMA::BlockingObject
 An object that can be used to block a thread until another thread signals it to resume. More...

Functions

void MPMA::AtomicIntInc (volatile unsigned int *pint)
 Atomically increments an integer.
void MPMA::AtomicIntDec (volatile unsigned int *pint)
 Atomically decrements an integer.
int MPMA::AtomicIntAdd (volatile int *pint, int addValue)
 Atomically adds one integer to another and returns the value of the original.
bool MPMA::AtomicCompareExchange (volatile unsigned int *pInt, unsigned int expectedValue, unsigned int newValue, volatile unsigned int &outResultValue)
 Compares expectedValue with the value at pInt, and if they are the same, sets pInt to newValue and returns true with outResultValue set to newValue. If they are different then pInt is unaffected, and returns false with outResultValue set to the value that was found at pInt.

Detailed Description

Thread locking constructs and atomic functions.


Generated on Sat Oct 20 15:23:23 2007 for MPMA Framework by  doxygen 1.5.3