18 #ifndef itkThreadSupport_h
19 #define itkThreadSupport_h
26 #ifdef ITK_USE_WIN32_THREADS
28 #define _WIN32_WINNT 0x0501 //TBB 4.4 requires WinXP (0x0501 or greater)
32 #if defined(ITK_USE_PTHREADS)
34 #elif defined(ITK_USE_WIN32_THREADS)
44 #if defined(ITK_USE_PTHREADS)
45 #define ITK_MAX_THREADS 128
48 typedef void *( * ThreadFunctionType )(
void *);
50 #define ITK_THREAD_RETURN_VALUE NULL
51 #define ITK_THREAD_RETURN_TYPE void *
54 #elif defined(ITK_USE_WIN32_THREADS)
56 #define ITK_MAX_THREADS 128
61 #define ITK_THREAD_RETURN_VALUE 0
62 #define ITK_THREAD_RETURN_TYPE unsigned __stdcall
66 #define ITK_MAX_THREADS 1
71 #define ITK_THREAD_RETURN_VALUE
72 #define ITK_THREAD_RETURN_TYPE void
78 #if defined(ITK_USE_PTHREADS)
80 pthread_cond_t m_ConditionVariable;
81 } ConditionVariableType;
82 #elif defined(ITK_USE_WIN32_THREADS)
84 int m_NumberOfWaiters;
85 CRITICAL_SECTION m_NumberOfWaitersLock;
90 HANDLE m_WaitersAreDone;
98 } ConditionVariableType;
void(* ThreadFunctionType)(void *)