vtkThreads.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThreads.h.in
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 #ifndef vtkThreads_h
16 #define vtkThreads_h
17 
18 /* Threading system. */
19 #define VTK_USE_PTHREADS
20 /* #undef VTK_USE_WIN32_THREADS */
21 #define VTK_MAX_THREADS 64
22 
23 // If VTK_USE_PTHREADS is defined, then the multithreaded
24 // function is of type void *, and returns nullptr
25 // Otherwise the type is void which is correct for WIN32
26 #ifdef VTK_USE_PTHREADS
27 #define VTK_THREAD_RETURN_VALUE nullptr
28 #define VTK_THREAD_RETURN_TYPE void*
29 #endif
30 
31 #ifdef VTK_USE_WIN32_THREADS
32 #define VTK_THREAD_RETURN_VALUE 0
33 #define VTK_THREAD_RETURN_TYPE vtkWindowsDWORD __stdcall
34 #endif
35 
36 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
37 #define VTK_THREAD_RETURN_VALUE
38 #define VTK_THREAD_RETURN_TYPE void
39 #endif
40 
41 #endif