| 1 | <?xml version="1.0" encoding="utf-8" ?> |
|---|
| 2 | <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" |
|---|
| 3 | "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd" [ |
|---|
| 4 | <!ENTITY % threads.entities SYSTEM "entities.xml"> |
|---|
| 5 | %threads.entities; |
|---|
| 6 | ]> |
|---|
| 7 | <section id="thread.configuration" last-revision="$Date: 2004/07/17 04:33:59 $"> |
|---|
| 8 | <title>Configuration</title> |
|---|
| 9 | <para>&Boost.Threads; uses several configuration macros in <boost/config.hpp>, |
|---|
| 10 | as well as configuration macros meant to be supplied by the application. These |
|---|
| 11 | macros are documented here. |
|---|
| 12 | </para> |
|---|
| 13 | <section id="thread.configuration.public"> |
|---|
| 14 | <title>Library Defined Public Macros</title> |
|---|
| 15 | <para> |
|---|
| 16 | These macros are defined by &Boost.Threads; but are expected to be used |
|---|
| 17 | by application code. |
|---|
| 18 | </para> |
|---|
| 19 | <informaltable> |
|---|
| 20 | <tgroup cols="2"> |
|---|
| 21 | <thead> |
|---|
| 22 | <row> |
|---|
| 23 | <entry>Macro</entry> |
|---|
| 24 | <entry>Meaning</entry> |
|---|
| 25 | </row> |
|---|
| 26 | </thead> |
|---|
| 27 | <tbody> |
|---|
| 28 | <row> |
|---|
| 29 | <entry>BOOST_HAS_THREADS</entry> |
|---|
| 30 | <entry> |
|---|
| 31 | Indicates that threading support is available. This means both that there |
|---|
| 32 | is a platform specific implementation for &Boost.Threads; and that |
|---|
| 33 | threading support has been enabled in a platform specific manner. For instance, |
|---|
| 34 | on the Win32 platform there's an implementation for &Boost.Threads; |
|---|
| 35 | but unless the program is compiled against one of the multithreading runtimes |
|---|
| 36 | (often determined by the compiler predefining the macro _MT) the BOOST_HAS_THREADS |
|---|
| 37 | macro remains undefined. |
|---|
| 38 | </entry> |
|---|
| 39 | </row> |
|---|
| 40 | </tbody> |
|---|
| 41 | </tgroup> |
|---|
| 42 | </informaltable> |
|---|
| 43 | </section> |
|---|
| 44 | <section id="thread.configuration.implementation"> |
|---|
| 45 | <title>Library Defined Implementation Macros</title> |
|---|
| 46 | <para> |
|---|
| 47 | These macros are defined by &Boost.Threads; and are implementation details |
|---|
| 48 | of interest only to implementors. |
|---|
| 49 | </para> |
|---|
| 50 | <informaltable> |
|---|
| 51 | <tgroup cols="2"> |
|---|
| 52 | <thead> |
|---|
| 53 | <row> |
|---|
| 54 | <entry>Macro</entry> |
|---|
| 55 | <entry>Meaning</entry> |
|---|
| 56 | </row> |
|---|
| 57 | </thead> |
|---|
| 58 | <tbody> |
|---|
| 59 | <row> |
|---|
| 60 | <entry>BOOST_HAS_WINTHREADS</entry> |
|---|
| 61 | <entry> |
|---|
| 62 | Indicates that the platform has the Microsoft Win32 threading libraries, |
|---|
| 63 | and that they should be used to implement &Boost.Threads;. |
|---|
| 64 | </entry> |
|---|
| 65 | </row> |
|---|
| 66 | <row> |
|---|
| 67 | <entry>BOOST_HAS_PTHREADS</entry> |
|---|
| 68 | <entry> |
|---|
| 69 | Indicates that the platform has the POSIX pthreads libraries, and that |
|---|
| 70 | they should be used to implement &Boost.Threads;. |
|---|
| 71 | </entry> |
|---|
| 72 | </row> |
|---|
| 73 | <row> |
|---|
| 74 | <entry>BOOST_HAS_FTIME</entry> |
|---|
| 75 | <entry> |
|---|
| 76 | Indicates that the implementation should use GetSystemTimeAsFileTime() |
|---|
| 77 | and the FILETIME type to calculate the current time. This is an implementation |
|---|
| 78 | detail used by boost::detail::getcurtime(). |
|---|
| 79 | </entry> |
|---|
| 80 | </row> |
|---|
| 81 | <row> |
|---|
| 82 | <entry>BOOST_HAS_GETTTIMEOFDAY</entry> |
|---|
| 83 | <entry> |
|---|
| 84 | Indicates that the implementation should use gettimeofday() to calculate |
|---|
| 85 | the current time. This is an implementation detail used by boost::detail::getcurtime(). |
|---|
| 86 | </entry> |
|---|
| 87 | </row> |
|---|
| 88 | </tbody> |
|---|
| 89 | </tgroup> |
|---|
| 90 | </informaltable> |
|---|
| 91 | </section> |
|---|
| 92 | </section> |
|---|