Public Member Functions

Celartem::Mutex Class Reference

#include <cel_syncobjs.h>

Inheritance diagram for Celartem::Mutex:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Mutex ()
 Mutex (int inDummy)
 ~Mutex ()
virtual void lock () const
virtual void unlock () const
void * getContext () const

Detailed Description

This class implements Mutex. The Mutex is identical to binary Semaphore except it accepts recursive lock in the same thread and it is far faster than Semaphore.
This class has its own DataTraits structure and it can be used with SimpleArray with some special restrictions; you can create, allocate, release the array of Mutex instances but you could not reallocate (resize) the array.

See also:
Semaphore, Lockable, Locker, SimpleArray

Constructor & Destructor Documentation

Celartem::Mutex::Mutex (  ) 

Initializes recursive Mutex instance.

Celartem::Mutex::Mutex ( int  inDummy  ) 

Initializes non recursive Mutex instance.

Parameters:
inDummy Dummy parameter which tells this constructor from the other one.
Celartem::Mutex::~Mutex (  ) 

Uninitializes the instance.


Member Function Documentation

void* Celartem::Mutex::getContext (  )  const [inline]

Reserved for internal use only.

virtual void Celartem::Mutex::lock (  )  const [virtual]

Locks the mutex. The recursive locks are accepted in the same thread.
For exception-safe programming, you should use Locker class instead of calling lock and unlock directly.

See also:
Locker

Implements Celartem::Lockable.

Referenced by Celartem::DjVu::MemoryData::lock(), and Celartem::DjVu::StorageData::lock().

virtual void Celartem::Mutex::unlock (  )  const [virtual]

Unlocks the mutex.
For exception-safe programming, you should use Locker class instead of calling lock and unlock directly.

See also:
Locker

Implements Celartem::Lockable.

Referenced by Celartem::DjVu::MemoryData::unlock(), and Celartem::DjVu::StorageData::unlock().


The documentation for this class was generated from the following file:

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:19.
Caminova Logo