35 #ifndef __igtlMultiThreader_h
36 #define __igtlMultiThreader_h
44 #ifdef OpenIGTLink_USE_SPROC
45 #include <sys/types.h>
49 #if defined(OpenIGTLink_USE_PTHREAD) || defined(OpenIGTLink_HP_PTHREAD)
51 #include <sys/types.h>
73 #ifdef OpenIGTLink_USE_SPROC
74 #define IGTL_MAX_THREADS 128
77 #ifdef OpenIGTLink_USE_PTHREADS
78 #define IGTL_MAX_THREADS 128
81 #ifdef OpenIGTLink_USE_WIN32_THREADS
82 #define IGTL_MAX_THREADS 128
87 #undef IGTL_MAX_THREADS
88 #define IGTL_MAX_THREADS 128
92 #if defined(__MINGW32__)
93 #undef IGTL_MAX_THREADS
94 #define IGTL_MAX_THREADS 1
98 #if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
99 #undef IGTL_MAX_THREADS
100 #define IGTL_MAX_THREADS 1
103 #ifndef IGTL_MAX_THREADS
104 #define IGTL_MAX_THREADS 1
107 #ifdef OpenIGTLink_USE_SPROC
112 #ifdef OpenIGTLink_USE_PTHREADS
113 typedef void *(*ThreadFunctionType)(
void *);
118 #ifdef OpenIGTLink_USE_WIN32_THREADS
124 #if !defined(OpenIGTLink_USE_PTHREADS) && !defined(OpenIGTLink_USE_WIN32_THREADS)
157 #define ThreadInfoStruct MultiThreader::ThreadInfo
174 virtual int GetNumberOfThreads();
180 static void SetGlobalMaximumNumberOfThreads(
int val);
181 static int GetGlobalMaximumNumberOfThreads();
187 static void SetGlobalDefaultNumberOfThreads(
int val);
188 static int GetGlobalDefaultNumberOfThreads();
198 void SingleMethodExecute();
204 void MultipleMethodExecute();
227 void TerminateThread(
int thread_id );
242 void PrintSelf(std::ostream& os)
const;
SmartPointer< const Self > ConstPointer
ThreadFunctionType m_SingleMethod
#define igtlTypeMacro(thisClass, superclass)
#define igtlSetClampMacro(name, type, min, max)
Light weight base class for most igtl classes.
MutexLock::Pointer ActiveFlagLock
SmartPointer< Self > Pointer
void(* ThreadFunctionType)(void *)
Base class for most igtl classes.