Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

clMutex Class Reference

Class implementation of POSIX mutex semaphore. More...

#include <Mutex.hh>

List of all members.

Public Member Functions

 clMutex ()
 Constructor; creates and initializes the mutex.

 ~clMutex ()
 Desctructor; destroys the mutex.

bool Wait ()
 Lock mutex.

bool Release ()
 Unlock mutex.

bool TryLock ()
 Try locking mutex without blocking the calling process.

pthread_mutex_t * GetPtr ()
 Return pointer to mutex variable.


Private Attributes

pthread_mutex_t pthmMutex


Detailed Description

Class implementation of POSIX mutex semaphore.

Definition at line 37 of file Mutex.hh.


Constructor & Destructor Documentation

clMutex::clMutex  )  [inline]
 

Constructor; creates and initializes the mutex.

Definition at line 44 of file Mutex.hh.

References pthmMutex.

clMutex::~clMutex  )  [inline]
 

Desctructor; destroys the mutex.

Definition at line 48 of file Mutex.hh.

References pthmMutex.


Member Function Documentation

bool clMutex::Wait  )  [inline]
 

Lock mutex.

Process is blocked until mutex lock becomes available.

Returns:
Success

Definition at line 55 of file Mutex.hh.

References pthmMutex.

Referenced by clDynThreadsBase::Create(), clDynThreadsBase::SetSched(), clDynThreadsBase::Wait(), and clDynThreadsBase::~clDynThreadsBase().

bool clMutex::Release  )  [inline]
 

Unlock mutex.

Returns:
Success

Definition at line 66 of file Mutex.hh.

References pthmMutex.

Referenced by clDynThreadsBase::Create(), clDynThreadsBase::SetSched(), clDynThreadsBase::Wait(), and clDynThreadsBase::~clDynThreadsBase().

bool clMutex::TryLock  )  [inline]
 

Try locking mutex without blocking the calling process.

Returns:
Success

Definition at line 77 of file Mutex.hh.

References pthmMutex.

pthread_mutex_t* clMutex::GetPtr  )  [inline]
 

Return pointer to mutex variable.

For use with condition variables.

Returns:
Pointer to pthread mutex variable

Definition at line 89 of file Mutex.hh.

References pthmMutex.


Member Data Documentation

pthread_mutex_t clMutex::pthmMutex [private]
 

Definition at line 39 of file Mutex.hh.

Referenced by clMutex(), GetPtr(), Release(), TryLock(), Wait(), and ~clMutex().


The documentation for this class was generated from the following file:
Generated on Tue Mar 2 19:47:12 2004 for libDSP by doxygen 1.3.6