1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Configuration</title> |
---|
5 | <link rel="stylesheet" href="../boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <link rel="start" href="../index.html" title="The Boost C++ Libraries"> |
---|
8 | <link rel="up" href="../threads.html" title="Chapter 12. Boost.Threads"> |
---|
9 | <link rel="prev" href="../threads/faq.html" title="Frequently Asked Questions"> |
---|
10 | <link rel="next" href="build.html" title="Build"> |
---|
11 | </head> |
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
13 | <table cellpadding="2" width="100%"> |
---|
14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td> |
---|
15 | <td align="center"><a href="../../../index.htm">Home</a></td> |
---|
16 | <td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> |
---|
17 | <td align="center"><a href="../../../people/people.htm">People</a></td> |
---|
18 | <td align="center"><a href="../../../more/faq.htm">FAQ</a></td> |
---|
19 | <td align="center"><a href="../../../more/index.htm">More</a></td> |
---|
20 | </table> |
---|
21 | <hr> |
---|
22 | <div class="spirit-nav"> |
---|
23 | <a accesskey="p" href="../threads/faq.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../threads.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="build.html"><img src="../images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="section" lang="en"> |
---|
26 | <div class="titlepage"><div><div><h3 class="title"> |
---|
27 | <a name="thread.configuration"></a>Configuration</h3></div></div></div> |
---|
28 | <div class="toc"><dl> |
---|
29 | <dt><span class="section"><a href="configuration.html#thread.configuration.public">Library Defined Public Macros</a></span></dt> |
---|
30 | <dt><span class="section"><a href="configuration.html#thread.configuration.implementation">Library Defined Implementation Macros</a></span></dt> |
---|
31 | </dl></div> |
---|
32 | <p><span class="bold"><strong>Boost.Threads</strong></span> uses several configuration macros in <boost/config.hpp>, |
---|
33 | as well as configuration macros meant to be supplied by the application. These |
---|
34 | macros are documented here. |
---|
35 | </p> |
---|
36 | <div class="section" lang="en"> |
---|
37 | <div class="titlepage"><div><div><h4 class="title"> |
---|
38 | <a name="thread.configuration.public"></a>Library Defined Public Macros</h4></div></div></div> |
---|
39 | <p> |
---|
40 | These macros are defined by <span class="bold"><strong>Boost.Threads</strong></span> but are expected to be used |
---|
41 | by application code. |
---|
42 | </p> |
---|
43 | <div class="informaltable"><table class="table"> |
---|
44 | <colgroup> |
---|
45 | <col> |
---|
46 | <col> |
---|
47 | </colgroup> |
---|
48 | <thead><tr> |
---|
49 | <th>Macro</th> |
---|
50 | <th>Meaning</th> |
---|
51 | </tr></thead> |
---|
52 | <tbody><tr> |
---|
53 | <td>BOOST_HAS_THREADS</td> |
---|
54 | <td> |
---|
55 | Indicates that threading support is available. This means both that there |
---|
56 | is a platform specific implementation for <span class="bold"><strong>Boost.Threads</strong></span> and that |
---|
57 | threading support has been enabled in a platform specific manner. For instance, |
---|
58 | on the Win32 platform there's an implementation for <span class="bold"><strong>Boost.Threads</strong></span> |
---|
59 | but unless the program is compiled against one of the multithreading runtimes |
---|
60 | (often determined by the compiler predefining the macro _MT) the BOOST_HAS_THREADS |
---|
61 | macro remains undefined. |
---|
62 | </td> |
---|
63 | </tr></tbody> |
---|
64 | </table></div> |
---|
65 | </div> |
---|
66 | <div class="section" lang="en"> |
---|
67 | <div class="titlepage"><div><div><h4 class="title"> |
---|
68 | <a name="thread.configuration.implementation"></a>Library Defined Implementation Macros</h4></div></div></div> |
---|
69 | <p> |
---|
70 | These macros are defined by <span class="bold"><strong>Boost.Threads</strong></span> and are implementation details |
---|
71 | of interest only to implementors. |
---|
72 | </p> |
---|
73 | <div class="informaltable"><table class="table"> |
---|
74 | <colgroup> |
---|
75 | <col> |
---|
76 | <col> |
---|
77 | </colgroup> |
---|
78 | <thead><tr> |
---|
79 | <th>Macro</th> |
---|
80 | <th>Meaning</th> |
---|
81 | </tr></thead> |
---|
82 | <tbody> |
---|
83 | <tr> |
---|
84 | <td>BOOST_HAS_WINTHREADS</td> |
---|
85 | <td> |
---|
86 | Indicates that the platform has the Microsoft Win32 threading libraries, |
---|
87 | and that they should be used to implement <span class="bold"><strong>Boost.Threads</strong></span>. |
---|
88 | </td> |
---|
89 | </tr> |
---|
90 | <tr> |
---|
91 | <td>BOOST_HAS_PTHREADS</td> |
---|
92 | <td> |
---|
93 | Indicates that the platform has the POSIX pthreads libraries, and that |
---|
94 | they should be used to implement <span class="bold"><strong>Boost.Threads</strong></span>. |
---|
95 | </td> |
---|
96 | </tr> |
---|
97 | <tr> |
---|
98 | <td>BOOST_HAS_FTIME</td> |
---|
99 | <td> |
---|
100 | Indicates that the implementation should use GetSystemTimeAsFileTime() |
---|
101 | and the FILETIME type to calculate the current time. This is an implementation |
---|
102 | detail used by boost::detail::getcurtime(). |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | <tr> |
---|
106 | <td>BOOST_HAS_GETTTIMEOFDAY</td> |
---|
107 | <td> |
---|
108 | Indicates that the implementation should use gettimeofday() to calculate |
---|
109 | the current time. This is an implementation detail used by boost::detail::getcurtime(). |
---|
110 | </td> |
---|
111 | </tr> |
---|
112 | </tbody> |
---|
113 | </table></div> |
---|
114 | </div> |
---|
115 | </div> |
---|
116 | <table width="100%"><tr> |
---|
117 | <td align="left"><small><p>Last revised: July 17, 2004 at 04:33:59 GMT</p></small></td> |
---|
118 | <td align="right"><small>Copyright © 2001-2003 William E. Kempf</small></td> |
---|
119 | </tr></table> |
---|
120 | <hr> |
---|
121 | <div class="spirit-nav"> |
---|
122 | <a accesskey="p" href="../threads/faq.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../threads.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="build.html"><img src="../images/next.png" alt="Next"></a> |
---|
123 | </div> |
---|
124 | </body> |
---|
125 | </html> |
---|