GNE::Mutex Class Reference
[Threading API]

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

#include <Mutex.h>

List of all members.

Public Member Functions

 Mutex ()
 Initializes this mutex.
void acquire ()
 Acquire the lock on a mutex, blocking if necessary.
void release ()
 Releases a locked mutex.

Friends

class Thread
class ConditionVariable

Classes

struct  MutexData


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 Tue Sep 5 23:47:48 2006 for GNE by  doxygen 1.4.7