Main Page   Modules   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

GNE::Mutex Class Reference
[Threading API]

#include <Mutex.h>

List of all members.

Public Member Functions

 Mutex ()
 Initalizes this mutex.

void acquire ()
 Acquire the lock on a mutex, blocking if necessary.

void release ()
 Releases a locked mutex.


Friends

class Thread
class ConditionVariable


Detailed Description

The mutex class models a simple mutex to provide mutual exclusion to a resource shared by threads.

This version of a mutex is recursive. This means that if a thread already owns the mutex, then a second lock will not deadlock. You need to unlock the mutex the same number of times it was locked to unlock it.


Member Function Documentation

void GNE::Mutex::acquire  ) 
 

Acquire the lock on a mutex, blocking if necessary.

  1. If the mutex is unlocked, lock it, and proceed.
  2. If the mutex is locked, wait for it to become unlocked, then go to step 1.


The documentation for this class was generated from the following files:
Generated on Fri Aug 22 13:40:06 2003 for GNE by doxygen1.3