Locks.h File Reference

Thread locking constructs and atomic functions. More...

#include "Types.h"
#include "Locks.cpp"
#include "linux/LocksLin32.h"

Include dependency graph for Locks.h:

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

Go to the source code of 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 uint *pint)
 Atomically increments an integer.
void MPMA::AtomicIntDec (volatile uint *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 uint *pInt, uint expectedValue, uint newValue, volatile uint &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 Aug 9 15:05:05 2008 for MPMA Framework by  doxygen 1.5.6