Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlSimpleFastMutexLock.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: The OpenIGTLink Library
4
Language: C++
5
Web page: http://openigtlink.org/
6
7
Copyright (c) Insight Software Consortium. All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notices for more information.
12
13
=========================================================================*/
14
/*=========================================================================
15
16
Program: Insight Segmentation & Registration Toolkit
17
Module: $RCSfile: itkSimpleFastMutexLock.h,v $
18
Language: C++
19
Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
20
Version: $Revision: 3460 $
21
22
Copyright (c) Insight Software Consortium. All rights reserved.
23
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
24
25
Portions of this code are covered under the VTK copyright.
26
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
27
28
This software is distributed WITHOUT ANY WARRANTY; without even
29
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30
PURPOSE. See the above copyright notices for more information.
31
32
=========================================================================*/
33
#ifndef __igtlSimpleFastMutexLock_h
34
#define __igtlSimpleFastMutexLock_h
35
36
#include "
igtlMacro.h
"
37
38
#ifdef OpenIGTLink_USE_SPROC
39
#include <abi_mutex.h>
40
#endif
41
42
#ifdef OpenIGTLink_USE_PTHREADS
43
#include <pthread.h>
44
#endif
45
46
#if defined(_WIN32) && !defined(OpenIGTLink_USE_PTHREADS)
47
#include "
igtlWindows.h
"
48
#endif
49
50
namespace
igtl
51
{
52
53
#ifdef OpenIGTLink_USE_SPROC
54
#include <abi_mutex.h>
55
typedef
abilock_t
FastMutexType
;
56
#endif
57
58
#ifdef OpenIGTLink_USE_PTHREADS
59
#include <pthread.h>
60
typedef
pthread_mutex_t
FastMutexType
;
61
#endif
62
63
#if defined(_WIN32) && !defined(OpenIGTLink_USE_PTHREADS)
64
#include <winbase.h>
65
typedef
CRITICAL_SECTION
FastMutexType
;
66
#endif
67
68
#ifndef OpenIGTLink_USE_SPROC
69
#ifndef OpenIGTLink_USE_PTHREADS
70
#ifndef _WIN32
71
typedef
int
FastMutexType
;
72
#endif
73
#endif
74
#endif
75
86
// Critical Section object that is not a igtlObject.
87
class
IGTLCommon_EXPORT
SimpleFastMutexLock
88
{
89
public
:
91
typedef
SimpleFastMutexLock
Self
;
92
94
SimpleFastMutexLock
();
95
~SimpleFastMutexLock
();
97
99
void
Lock
()
const
;
100
102
void
Unlock
()
const
;
103
104
protected
:
105
mutable
FastMutexType
m_FastMutexLock
;
106
};
107
108
}
//end igtl namespace
109
#endif
110
igtl::SimpleFastMutexLock
Critical section locking class that can be allocated on the stack.
Definition
igtlSimpleFastMutexLock.h:88
igtl::SimpleFastMutexLock::SimpleFastMutexLock
SimpleFastMutexLock()
igtl::SimpleFastMutexLock::Self
SimpleFastMutexLock Self
Definition
igtlSimpleFastMutexLock.h:91
igtl::SimpleFastMutexLock::Unlock
void Unlock() const
igtl::SimpleFastMutexLock::~SimpleFastMutexLock
~SimpleFastMutexLock()
igtl::SimpleFastMutexLock::Lock
void Lock() const
igtl::SimpleFastMutexLock::m_FastMutexLock
FastMutexType m_FastMutexLock
Definition
igtlSimpleFastMutexLock.h:105
igtlMacro.h
IGTLCommon_EXPORT
#define IGTLCommon_EXPORT
Definition
igtlWin32Header.h:151
igtlWindows.h
igtl
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
Definition
igtlBindMessage.h:26
igtl::FastMutexType
int FastMutexType
Definition
igtlSimpleFastMutexLock.h:71
Generated for OpenIGTLink by
Doxygen
1.9.8 written by
Dimitri van Heesch
, © 1997-2012