SourceForge.net Logo
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EkNullMutex Class Reference

The whole purpose of this class is to do nothing. More...

#include <EkNullMutex.h>

List of all members.

Public Methods

 EkNullMutex ()
 ~EkNullMutex ()
void lock (void)
void unlock (void)


Detailed Description

The whole purpose of this class is to do nothing.

It is a stand in for something that will block when trying to get the lock if it is already locked. This class is meant to be used in single-threaded environment.

Most users of mutex classes will define a macro which identifies the type of mutex to use within a particular context. When a build of the application is done for a single threaded environment, these macros can be assigned the value EkNullMutex. When a build is done for a multi-threaded environment, the macro can be defined to refer to a class which implements real mutual exclusion.

define EK_DEBUG_NULL_MUTEX, if you want some minimal code added to EkNullMutex to allow for synchronization checks. With this symbol defined the lock( ) and unlock( ) functions will check to make sure that the mutex is in the correct (i.e., opposite) state. If an error occurs, the static function EkNullMutex::mutexError will be called.


Constructor & Destructor Documentation

EkNullMutex::EkNullMutex   [inline]
 

EkNullMutex::~EkNullMutex   [inline]
 


Member Function Documentation

void EkNullMutex::lock void    [inline]
 

void EkNullMutex::unlock void    [inline]
 


The documentation for this class was generated from the following file:
Last Updated: March 12, 2003 (rlr)
Copyright © 2003 Eastman Kodak Company All Rights Reserved.