Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:32:36

0001 // Copyright 2006 Roland Schwarz.
0002 // (C) Copyright 2007 Anthony Williams
0003 // Distributed under the Boost Software License, Version 1.0. (See
0004 // accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // This work is a reimplementation along the design and ideas
0008 // of William E. Kempf.
0009 
0010 #ifndef BOOST_THREAD_RS06040501_HPP
0011 #define BOOST_THREAD_RS06040501_HPP
0012 
0013 // fetch compiler and platform configuration
0014 #include <boost/config.hpp>
0015 
0016 // insist on threading support being available:
0017 #include <boost/config/requires_threads.hpp>
0018 
0019 // choose platform
0020 #if defined(linux) || defined(__linux) || defined(__linux__)
0021 #  define BOOST_THREAD_LINUX
0022 //#  define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(100000)
0023 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
0024 #  define BOOST_THREAD_BSD
0025 #elif defined(sun) || defined(__sun)
0026 #  define BOOST_THREAD_SOLARIS
0027 #elif defined(__sgi)
0028 #  define BOOST_THREAD_IRIX
0029 #elif defined(__hpux)
0030 #  define BOOST_THREAD_HPUX
0031 #elif defined(__CYGWIN__)
0032 #  define BOOST_THREAD_CYGWIN
0033 #elif (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(BOOST_DISABLE_WIN32)
0034 #if ! defined BOOST_THREAD_WIN32
0035 #  define BOOST_THREAD_WIN32
0036 #endif
0037 #elif defined(__BEOS__)
0038 #  define BOOST_THREAD_BEOS
0039 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
0040 #  define BOOST_THREAD_MACOS
0041 //#  define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
0042 #elif defined(__IBMCPP__) || defined(_AIX)
0043 #  define BOOST_THREAD_AIX
0044 #elif defined(__amigaos__)
0045 #  define BOOST_THREAD_AMIGAOS
0046 #elif defined(__QNXNTO__)
0047 #  define BOOST_THREAD_QNXNTO
0048 #elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
0049 #       if defined(BOOST_HAS_PTHREADS) && !defined(BOOST_THREAD_POSIX)
0050 #               define BOOST_THREAD_POSIX
0051 #       endif
0052 #endif
0053 
0054 // For every supported platform add a new entry into the dispatch table below.
0055 // BOOST_THREAD_POSIX is tested first, so on platforms where posix and native
0056 // threading is available, the user may choose, by defining BOOST_THREAD_POSIX
0057 // in her source. If a platform is known to support pthreads and no native
0058 // port of boost_thread is available just specify "pthread" in the
0059 // dispatcher table. If there is no entry for a platform but pthreads is
0060 // available on the platform, pthread is choosen as default. If nothing is
0061 // available the preprocessor will fail with a diagnostic message.
0062 
0063 #if defined(BOOST_THREAD_POSIX)
0064 #  define BOOST_THREAD_PLATFORM_PTHREAD
0065 #else
0066 #  if defined(BOOST_THREAD_WIN32)
0067 #       define BOOST_THREAD_PLATFORM_WIN32
0068 #  elif defined(BOOST_HAS_PTHREADS)
0069 #       define BOOST_THREAD_PLATFORM_PTHREAD
0070 #  else
0071 #       error "Sorry, no boost threads are available for this platform."
0072 #  endif
0073 #endif
0074 
0075 #endif // BOOST_THREAD_RS06040501_HPP