Loki::SpinLevelMutex Class Reference

#include <LevelMutex.h>

Inheritance diagram for Loki::SpinLevelMutex:
[legend]

List of all members.

Public Member Functions

 SpinLevelMutex (unsigned int level)
 Constructs a spin-level mutex.
virtual ~SpinLevelMutex (void)
 Destructs the mutex.


Detailed Description

Implements a spin-loop to wait for the mutex to unlock. Since this class makes the thread wait in a tight spin-loop, it can cause the thread to remain busy while waiting and thus consume CPU cycles. For that reason, this mutex is best used only for very low-level resources - especially resources which do not require much CPU time to exercise. Rule of thumb: Use this only if all actions on the resource consume a very small number of CPU cycles. Otherwise, use the SleepLevelMutex instead.
The documentation for this class was generated from the following files:

Generated on Thu Jan 29 18:51:43 2009 for Loki by  doxygen 1.5.8