Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtlSimpleFastMutexLock.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Open IGT Link Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlSimpleFastMutexLock.h $
5  Language: C++
6  Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
7  Version: $Revision: 3460 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14 
15 =========================================================================*/
16 /*=========================================================================
17 
18  Program: Insight Segmentation & Registration Toolkit
19  Module: $RCSfile: itkSimpleFastMutexLock.h,v $
20  Language: C++
21  Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
22  Version: $Revision: 3460 $
23 
24  Copyright (c) Insight Software Consortium. All rights reserved.
25  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
26 
27  Portions of this code are covered under the VTK copyright.
28  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
29 
30  This software is distributed WITHOUT ANY WARRANTY; without even
31  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
32  PURPOSE. See the above copyright notices for more information.
33 
34 =========================================================================*/
35 #ifndef __igtlSimpleFastMutexLock_h
36 #define __igtlSimpleFastMutexLock_h
37 
38 #include "igtlMacro.h"
39 
40 #ifdef OpenIGTLink_USE_SPROC
41 #include <abi_mutex.h>
42 #endif
43 
44 #ifdef OpenIGTLink_USE_PTHREADS
45 #include <pthread.h>
46 #endif
47 
48 #if defined(_WIN32) && !defined(OpenIGTLink_USE_PTHREADS)
49 #include "igtlWindows.h"
50 #endif
51 
52 namespace igtl
53 {
54 
55 #ifdef OpenIGTLink_USE_SPROC
56 #include <abi_mutex.h>
57 typedef abilock_t FastMutexType;
58 #endif
59 
60 #ifdef OpenIGTLink_USE_PTHREADS
61 #include <pthread.h>
62 typedef pthread_mutex_t FastMutexType;
63 #endif
64 
65 #if defined(_WIN32) && !defined(OpenIGTLink_USE_PTHREADS)
66 #include <winbase.h>
67 typedef CRITICAL_SECTION FastMutexType;
68 #endif
69 
70 #ifndef OpenIGTLink_USE_SPROC
71 #ifndef OpenIGTLink_USE_PTHREADS
72 #ifndef _WIN32
73 typedef int FastMutexType;
74 #endif
75 #endif
76 #endif
77 
88 // Critical Section object that is not a igtlObject.
90 {
91 public:
94 
99 
101  void Lock() const;
102 
104  void Unlock() const;
105 
106 protected:
108 };
109 
110 }//end igtl namespace
111 #endif
112 
113 

Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000