Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

Mutex Class Reference

#include <Mutex.hpp>

List of all members.

Public Methods

 Mutex ()
virtual ~Mutex ()

Protected Methods

virtual void lock ()
virtual void unlock ()
virtual void wait ()

Private Methods

 Mutex (const Mutex &src)
Mutex & operator= (const Mutex &right)
void notify ()
void notifyAll ()

Private Attributes

pthread_mutex_t mutex
pthread_mutexattr_t mutexAttr
pthread_cond_t cond
pthread_condattr_t condAttr

Friends

class Lock


Constructor & Destructor Documentation

Mutex::Mutex  
 

Definition at line 6 of file Mutex.cpp.

00006              {
00007   pthread_mutexattr_init(&mutexAttr);
00008   pthread_mutex_init(&mutex, &mutexAttr);
00009   pthread_condattr_init(&condAttr);
00010   pthread_cond_init(&cond, &condAttr);
00011 }

Mutex::~Mutex   [virtual]
 

Definition at line 13 of file Mutex.cpp.

00013               {
00014   pthread_mutex_destroy(&mutex);
00015   pthread_mutexattr_destroy(&mutexAttr);
00016   pthread_cond_destroy(&cond);
00017   pthread_condattr_destroy(&condAttr);
00018 }

Mutex::Mutex const Mutex &    src [private]
 


Member Function Documentation

void Mutex::lock   [protected, virtual]
 

Definition at line 20 of file Mutex.cpp.

00020                  {
00021   pthread_mutex_lock(&mutex);
00022 }

void Mutex::notify   [private]
 

Definition at line 32 of file Mutex.cpp.

00032                    {
00033   pthread_cond_signal(&cond);
00034 }

void Mutex::notifyAll   [private]
 

Definition at line 36 of file Mutex.cpp.

00036                       {
00037   pthread_cond_broadcast(&cond);
00038 }

Mutex& Mutex::operator= const Mutex &    right [private]
 

void Mutex::unlock   [protected, virtual]
 

Definition at line 24 of file Mutex.cpp.

00024                    {
00025   pthread_mutex_unlock(&mutex);
00026 }

void Mutex::wait   [protected, virtual]
 

Definition at line 28 of file Mutex.cpp.

00028                  {
00029   pthread_cond_wait(&cond, &mutex);
00030 }


Friends And Related Function Documentation

friend class Lock [friend]
 

Definition at line 41 of file Mutex.hpp.


Member Data Documentation

pthread_cond_t Mutex::cond [private]
 

Definition at line 38 of file Mutex.hpp.

pthread_condattr_t Mutex::condAttr [private]
 

Definition at line 39 of file Mutex.hpp.

pthread_mutex_t Mutex::mutex [private]
 

Definition at line 36 of file Mutex.hpp.

pthread_mutexattr_t Mutex::mutexAttr [private]
 

Definition at line 37 of file Mutex.hpp.


The documentation for this class was generated from the following files:
Generated on Sun Oct 14 18:49:25 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001