Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MutexLockBase Class Reference

#include <MutexLock.h>

Inheritance diagram for MutexLockBase:

Inheritance graph
[legend]
List of all members.

Detailed Description

The main purpose of this base class is actually to allow setting of usleep_granularity across all locks.

It would be nice if we just put functions in here so we could reference locks without regard to the number of doors, but then all processes which use the lock would have to have been created via fork to handle virtual calls properly, and I don't want to put that overhead on the otherwise lightweight SoundPlay process under Aperios.

Definition at line 28 of file MutexLock.h.

Public Member Functions

virtual ~MutexLockBase ()
 basic destructor

Static Public Attributes

static const unsigned int NO_OWNER = -1U
 marks as unlocked
static unsigned int usleep_granularity = 5000
 the estimated cost in microseconds of usleep call itself -- value passed to usleep will be 10 times this (only used by software lock implementation on non-Aperios)


Constructor & Destructor Documentation

virtual MutexLockBase::~MutexLockBase  )  [inline, virtual]
 

basic destructor

Definition at line 30 of file MutexLock.h.


Member Data Documentation

const unsigned int MutexLockBase::NO_OWNER = -1U [static]
 

marks as unlocked

Definition at line 32 of file MutexLock.h.

Referenced by MutexLock< num_doors >::do_try_lock(), MutexLock< num_doors >::forget(), MutexLock< num_doors >::lookup(), MutexLock< MAX_ACCESS >::owner(), and MutexLock< num_doors >::unlock().

unsigned int MutexLockBase::usleep_granularity = 5000 [static]
 

the estimated cost in microseconds of usleep call itself -- value passed to usleep will be 10 times this (only used by software lock implementation on non-Aperios)

Definition at line 33 of file MutexLock.h.

Referenced by MutexLock< MAX_ACCESS >::spin().


The documentation for this class was generated from the following files:

Tekkotsu v2.4.1
Generated Tue Aug 16 16:35:06 2005 by Doxygen 1.4.4