Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSimpleFastMutexLock.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSimpleFastMutexLock.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:29:26 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkSimpleFastMutexLock_h
00021 #define __itkSimpleFastMutexLock_h
00022 
00023 #include "itkMacro.h"
00024 
00025 #ifdef ITK_USE_SPROC
00026 #include <abi_mutex.h>
00027 #endif
00028 
00029 #ifdef ITK_USE_PTHREADS
00030 #include <pthread.h>
00031 #endif
00032  
00033 #if defined(_WIN32) && !defined(ITK_USE_PTHREADS)
00034 #include "itkWindows.h"
00035 #endif
00036 
00037 namespace itk
00038 {
00039 
00040 #ifdef ITK_USE_SPROC
00041 #include <abi_mutex.h>
00042 typedef abilock_t FastMutexType;
00043 #endif
00044 
00045 #ifdef ITK_USE_PTHREADS
00046 #include <pthread.h>
00047 typedef pthread_mutex_t FastMutexType;
00048 #endif
00049  
00050 #if defined(_WIN32) && !defined(ITK_USE_PTHREADS)
00051 #include <winbase.h>
00052 typedef CRITICAL_SECTION FastMutexType;
00053 #endif
00054 
00055 #ifndef ITK_USE_SPROC
00056 #ifndef ITK_USE_PTHREADS
00057 #ifndef _WIN32
00058 typedef int FastMutexType;
00059 #endif
00060 #endif
00061 #endif
00062 
00073 // Critical Section object that is not a itkObject.
00074 class ITKCommon_EXPORT SimpleFastMutexLock
00075 {
00076 public:
00078   typedef SimpleFastMutexLock       Self;
00079   
00081   SimpleFastMutexLock();
00082   ~SimpleFastMutexLock();
00083   
00085   void Lock( void ) const;
00086 
00088   void Unlock( void ) const;
00089 
00090 protected:
00091   mutable FastMutexType   m_FastMutexLock;
00092 };
00093 
00094 }//end itk namespace
00095 #endif
00096 

Generated at Thu May 25 00:04:18 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000