HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SYS_BoostThread.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SYS_BoostThread.h (UT Library, C++)
7  *
8  * COMMENTS: This header should be included by anyone wanting to use
9  * boost thread, rather than including the boost header directly.
10  */
11 
12 #ifndef __SYS_BOOSTTHREAD_H_INCLUDED__
13 #define __SYS_BOOSTTHREAD_H_INCLUDED__
14 
15 // Including <hboost/thread.hpp> results in <windows.h> being included
16 #ifndef WIN32_LEAN_AND_MEAN
17 #define WIN32_LEAN_AND_MEAN
18 #endif
19 
20 // Disable use of HBOOST_THREAD_WIN32_HAS_GET_TICK_COUNT_64 by tricking it
21 // by include sdkddkver.h to fix bug 66054
22 
23 #if defined(_MSC_VER)
24 #include <sdkddkver.h>
25 #endif
26 
27 #if defined(MBSD) && _POSIX_C_SOURCE >= 200112L
28 // getpagesize(3) has been deprecated in 10.7.6
29 inline int getpagesize()
30 {
31  return (int)sysconf(_SC_PAGESIZE);
32 }
33 
34 #endif
35 
36 #include "SYS_Pragma.h"
37 
38 // Keep this list of includes lean and mean.
39 // Only include what is absolutely needed.
40 #include <hboost/thread/condition_variable.hpp>
41 #include <hboost/thread/mutex.hpp>
42 #include <hboost/thread/recursive_mutex.hpp>
43 #include <hboost/thread/tss.hpp>
44 #include <hboost/thread/thread_time.hpp>
45 #include <hboost/thread/barrier.hpp>
46 
47 // Double-check that we do not have this defined
48 #ifdef HBOOST_THREAD_WIN32_HAS_GET_TICK_COUNT_64
49 #error Do not use GetTickCount64()!
50 #endif
51 
52 #endif // __SYS_BOOSTTHREAD_H_INCLUDED__