vtkThreads.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkThreads_h
4 #define vtkThreads_h
5 
6 /* Threading system. */
7 #define VTK_USE_PTHREADS
8 /* #undef VTK_USE_WIN32_THREADS */
9 #define VTK_MAX_THREADS 64
10 
11 // If VTK_USE_PTHREADS is defined, then the multithreaded
12 // function is of type void *, and returns nullptr
13 // Otherwise the type is void which is correct for WIN32
14 #ifdef VTK_USE_PTHREADS
15 #define VTK_THREAD_RETURN_VALUE nullptr
16 #define VTK_THREAD_RETURN_TYPE void*
17 #endif
18 
19 #ifdef VTK_USE_WIN32_THREADS
20 #define VTK_THREAD_RETURN_VALUE 0
21 #define VTK_THREAD_RETURN_TYPE vtkWindowsDWORD __stdcall
22 #endif
23 
24 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
25 #define VTK_THREAD_RETURN_VALUE
26 #define VTK_THREAD_RETURN_TYPE void
27 #endif
28 
29 #endif