Public Member Functions | List of all members
Celartem::Mutex Class Reference

#include <cel_syncobjs.h>

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

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
inDummyDummy 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::StorageData::lock(), and Celartem::DjVu::MemoryData::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::StorageData::unlock(), and Celartem::DjVu::MemoryData::unlock().


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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:06.
Cuminas Logo