2012-05-10 00:45:30 -04:00
|
|
|
// Copyright (C) 2001-2003
|
|
|
|
// William E. Kempf
|
2012-07-21 14:37:40 -04:00
|
|
|
// Copyright (C) 2011-2012 Vicente J. Botet Escriba
|
2012-05-10 00:45:30 -04:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
#ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
|
|
|
|
#define BOOST_THREAD_CONFIG_WEK01032003_HPP
|
|
|
|
|
2013-01-13 17:38:19 -05:00
|
|
|
// Force SIG_ATOMIC_MAX to be defined
|
|
|
|
//#ifndef __STDC_LIMIT_MACROS
|
|
|
|
//#define __STDC_LIMIT_MACROS
|
|
|
|
//#endif
|
|
|
|
|
2012-05-10 00:45:30 -04:00
|
|
|
#include <boost/config.hpp>
|
|
|
|
#include <boost/detail/workaround.hpp>
|
2013-02-13 23:03:52 -05:00
|
|
|
#include <boost/thread/detail/platform.hpp>
|
2012-05-10 00:45:30 -04:00
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
#if ! defined BOOST_THREAD_NOEXCEPT_OR_THROW
|
|
|
|
#ifdef BOOST_NO_CXX11_NOEXCEPT
|
2013-01-13 17:38:19 -05:00
|
|
|
# define BOOST_THREAD_NOEXCEPT_OR_THROW throw()
|
|
|
|
#else
|
|
|
|
# define BOOST_THREAD_NOEXCEPT_OR_THROW noexcept
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
|
|
|
|
#define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX) \
|
|
|
|
if (EXPR) {} else boost::throw_exception(EX)
|
|
|
|
#define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \
|
|
|
|
if (EXPR) {} else boost::throw_exception(EX)
|
|
|
|
#define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \
|
|
|
|
boost::throw_exception(EX)
|
|
|
|
#else
|
|
|
|
#define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX)
|
|
|
|
#define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \
|
|
|
|
(void)(EXPR)
|
|
|
|
#define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \
|
|
|
|
return (RET)
|
|
|
|
#endif
|
2013-01-13 17:38:19 -05:00
|
|
|
|
2012-07-21 14:37:40 -04:00
|
|
|
// This compiler doesn't support Boost.Chrono
|
2013-02-13 23:03:52 -05:00
|
|
|
#if defined __IBMCPP__ && (__IBMCPP__ < 1100) \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_USE_CHRONO
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_DONT_USE_CHRONO
|
2013-02-13 23:03:52 -05:00
|
|
|
#if ! defined BOOST_THREAD_USE_DATE
|
|
|
|
#define BOOST_THREAD_USE_DATE
|
|
|
|
#endif
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// This compiler doesn't support Boost.Move
|
2013-02-13 23:03:52 -05:00
|
|
|
#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_USE_MOVE
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_DONT_USE_MOVE
|
|
|
|
#endif
|
2012-05-10 00:45:30 -04:00
|
|
|
|
2012-07-21 14:37:40 -04:00
|
|
|
// This compiler doesn't support Boost.Container Allocators files
|
2013-02-13 23:03:52 -05:00
|
|
|
#if defined __SUNPRO_CC \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
|
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
#if defined _WIN32_WCE && _WIN32_WCE==0x501 \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
|
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
#if defined BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX || defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
|
|
|
#define BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
|
|
|
|
#define BOOST_THREAD_NO_MAKE_LOCK_GUARD
|
|
|
|
#define BOOST_THREAD_NO_MAKE_STRICT_LOCK
|
|
|
|
#define BOOST_THREAD_NO_MAKE_NESTED_STRICT_LOCK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
|
|
|
#define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS
|
|
|
|
#elif defined _MSC_VER && _MSC_VER <= 1600
|
|
|
|
// C++ features supported by VC++ 10 (aka 2010)
|
|
|
|
#define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/// BASIC_THREAD_ID
|
|
|
|
// todo to be removed for 1.54
|
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_BASIC_THREAD_ID \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
/// RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
|
|
|
|
#if defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC
|
|
|
|
#define BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Default version
|
2012-05-10 00:45:30 -04:00
|
|
|
#if !defined BOOST_THREAD_VERSION
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_VERSION 2
|
2012-05-10 00:45:30 -04:00
|
|
|
#else
|
2013-02-13 23:03:52 -05:00
|
|
|
#if BOOST_THREAD_VERSION!=2 && BOOST_THREAD_VERSION!=3 && BOOST_THREAD_VERSION!=4
|
|
|
|
#error "BOOST_THREAD_VERSION must be 2, 3 or 4"
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
// CHRONO
|
2013-01-13 17:38:19 -05:00
|
|
|
// Uses Boost.Chrono by default if not stated the opposite defining BOOST_THREAD_DONT_USE_CHRONO
|
2013-02-13 23:03:52 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_USE_CHRONO \
|
|
|
|
&& ! defined BOOST_THREAD_USES_CHRONO
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_USES_CHRONO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BOOST_THREAD_VERSION==2
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// PROVIDE_PROMISE_LAZY
|
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
|
|
|
|
#define BOOST_THREAD_PROVIDES_PROMISE_LAZY
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// PROVIDE_THREAD_EQ
|
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_EQ \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_THREAD_EQ
|
|
|
|
#define BOOST_THREAD_PROVIDES_THREAD_EQ
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
#if BOOST_THREAD_VERSION>=3
|
|
|
|
|
|
|
|
// ONCE_CXX11
|
|
|
|
// fixme BOOST_THREAD_PROVIDES_ONCE_CXX11 doesn't works when thread.cpp is compiled BOOST_THREAD_VERSION 3
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_ONCE_CXX11
|
2013-02-13 23:03:52 -05:00
|
|
|
#define BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11
|
2012-07-21 14:37:40 -04:00
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// PROVIDE_FUTURE
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_FUTURE
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_FUTURE
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// FUTURE_CTOR_ALLOCATORS
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// SHARED_MUTEX_UPWARDS_CONVERSIONS
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSIONS \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// PROVIDE_EXPLICIT_LOCK_CONVERSION
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// GENERIC_SHARED_MUTEX_ON_WIN
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
|
|
|
|
#endif
|
2013-02-13 23:03:52 -05:00
|
|
|
|
|
|
|
// USE_MOVE
|
2013-01-13 17:38:19 -05:00
|
|
|
#if ! defined BOOST_THREAD_DONT_USE_MOVE \
|
|
|
|
&& ! defined BOOST_THREAD_USES_MOVE
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_USES_MOVE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
// deprecated since version 4
|
|
|
|
#if BOOST_THREAD_VERSION < 4
|
|
|
|
|
|
|
|
// NESTED_LOCKS
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
|
|
|
|
#define BOOST_THREAD_PROVIDES_NESTED_LOCKS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CONDITION
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_CONDITION \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION
|
|
|
|
#define BOOST_THREAD_PROVIDES_CONDITION
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// USE_DATETIME
|
|
|
|
#if ! defined BOOST_THREAD_DONT_USE_DATETIME \
|
|
|
|
&& ! defined BOOST_THREAD_USES_DATETIME
|
|
|
|
#define BOOST_THREAD_USES_DATETIME
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BOOST_THREAD_VERSION>=4
|
|
|
|
|
|
|
|
// SIGNATURE_PACKAGED_TASK
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK
|
|
|
|
#define BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// VARIADIC_THREAD
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_VARIADIC_THREAD \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD
|
|
|
|
|
|
|
|
#if ! defined(BOOST_NO_SFINAE_EXPR) && \
|
|
|
|
! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
|
|
|
|
! defined(BOOST_NO_CXX11_DECLTYPE) && \
|
|
|
|
! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \
|
|
|
|
! defined(BOOST_NO_CXX11_AUTO) && \
|
|
|
|
! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
|
|
|
|
! defined(BOOST_NO_CXX11_HDR_TUPLE)
|
|
|
|
|
|
|
|
#define BOOST_THREAD_PROVIDES_VARIADIC_THREAD
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// FUTURE_CONTINUATION
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CONTINUATION
|
|
|
|
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// FUTURE_INVALID_AFTER_GET
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_INVALID_AFTER_GET
|
|
|
|
#define BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// NESTED_LOCKS
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
|
|
|
|
#define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CONDITION
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_CONDITION \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION
|
|
|
|
#define BOOST_THREAD_DONT_PROVIDE_CONDITION
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // BOOST_THREAD_VERSION>=4
|
|
|
|
|
|
|
|
// INTERRUPTIONS
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_INTERRUPTIONS \
|
|
|
|
&& ! defined BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
|
|
|
|
#define BOOST_THREAD_PROVIDES_INTERRUPTIONS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CORRELATIONS
|
|
|
|
|
|
|
|
// EXPLICIT_LOCK_CONVERSION.
|
|
|
|
#if defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
|
|
|
|
#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION explicit
|
|
|
|
#else
|
|
|
|
#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION
|
|
|
|
#endif
|
|
|
|
|
2012-07-21 14:37:40 -04:00
|
|
|
// BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN is defined if BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
|
2013-01-13 17:38:19 -05:00
|
|
|
#if defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS \
|
|
|
|
&& ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
|
2012-07-21 14:37:40 -04:00
|
|
|
#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.52
|
|
|
|
// BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
|
2013-02-13 23:03:52 -05:00
|
|
|
#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
|
|
|
|
|
|
|
|
#if ! defined BOOST_THREAD_PROVIDES_THREAD_EQ
|
|
|
|
#define BOOST_THREAD_PROVIDES_THREAD_EQ
|
|
|
|
#endif
|
|
|
|
|
2012-05-10 00:45:30 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
|
|
|
# pragma warn -8008 // Condition always true/false
|
|
|
|
# pragma warn -8080 // Identifier declared but never used
|
|
|
|
# pragma warn -8057 // Parameter never used
|
|
|
|
# pragma warn -8066 // Unreachable code
|
|
|
|
#endif
|
|
|
|
|
2012-07-21 14:37:40 -04:00
|
|
|
#include <boost/thread/detail/platform.hpp>
|
2012-05-10 00:45:30 -04:00
|
|
|
|
2013-02-13 23:03:52 -05:00
|
|
|
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
|
|
|
#else
|
|
|
|
# if defined(BOOST_HAS_PTHREAD_DELAY_NP) || defined(BOOST_HAS_NANOSLEEP)
|
|
|
|
# define BOOST_THREAD_SLEEP_FOR_IS_STEADY
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2012-05-10 00:45:30 -04:00
|
|
|
// provided for backwards compatibility, since this
|
|
|
|
// macro was used for several releases by mistake.
|
2013-01-13 17:38:19 -05:00
|
|
|
#if defined(BOOST_THREAD_DYN_DLL) && ! defined BOOST_THREAD_DYN_LINK
|
2012-05-10 00:45:30 -04:00
|
|
|
# define BOOST_THREAD_DYN_LINK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// compatibility with the rest of Boost's auto-linking code:
|
|
|
|
#if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
|
|
|
|
# undef BOOST_THREAD_USE_LIB
|
|
|
|
# define BOOST_THREAD_USE_DLL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BOOST_THREAD_BUILD_DLL) //Build dll
|
|
|
|
#elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
|
|
|
|
#elif defined(BOOST_THREAD_USE_DLL) //Use dll
|
|
|
|
#elif defined(BOOST_THREAD_USE_LIB) //Use lib
|
|
|
|
#else //Use default
|
|
|
|
# if defined(BOOST_THREAD_PLATFORM_WIN32)
|
|
|
|
# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
|
|
|
|
//For compilers supporting auto-tss cleanup
|
|
|
|
//with Boost.Threads lib, use Boost.Threads lib
|
|
|
|
# define BOOST_THREAD_USE_LIB
|
|
|
|
# else
|
|
|
|
//For compilers not yet supporting auto-tss cleanup
|
|
|
|
//with Boost.Threads lib, use Boost.Threads dll
|
|
|
|
# define BOOST_THREAD_USE_DLL
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# define BOOST_THREAD_USE_LIB
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BOOST_HAS_DECLSPEC)
|
|
|
|
# if defined(BOOST_THREAD_BUILD_DLL) //Build dll
|
|
|
|
# define BOOST_THREAD_DECL BOOST_SYMBOL_EXPORT
|
|
|
|
//# define BOOST_THREAD_DECL __declspec(dllexport)
|
|
|
|
|
|
|
|
# elif defined(BOOST_THREAD_USE_DLL) //Use dll
|
|
|
|
# define BOOST_THREAD_DECL BOOST_SYMBOL_IMPORT
|
|
|
|
//# define BOOST_THREAD_DECL __declspec(dllimport)
|
|
|
|
# else
|
|
|
|
# define BOOST_THREAD_DECL
|
|
|
|
# endif
|
|
|
|
#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
|
|
|
|
# define BOOST_THREAD_DECL BOOST_SYMBOL_VISIBLE
|
|
|
|
|
|
|
|
#else
|
|
|
|
# define BOOST_THREAD_DECL
|
|
|
|
#endif // BOOST_HAS_DECLSPEC
|
|
|
|
|
|
|
|
//
|
|
|
|
// Automatically link to the correct build variant where possible.
|
|
|
|
//
|
|
|
|
#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
|
|
|
|
//
|
|
|
|
// Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
|
|
|
|
// once it's done with it:
|
|
|
|
//
|
|
|
|
#if defined(BOOST_THREAD_USE_DLL)
|
|
|
|
# define BOOST_DYN_LINK
|
|
|
|
#endif
|
|
|
|
//
|
|
|
|
// Set the name of our library, this will get undef'ed by auto_link.hpp
|
|
|
|
// once it's done with it:
|
|
|
|
//
|
|
|
|
#if defined(BOOST_THREAD_LIB_NAME)
|
|
|
|
# define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME
|
|
|
|
#else
|
|
|
|
# define BOOST_LIB_NAME boost_thread
|
|
|
|
#endif
|
|
|
|
//
|
|
|
|
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
|
|
|
//
|
|
|
|
// And include the header that does the work:
|
|
|
|
//
|
|
|
|
#include <boost/config/auto_link.hpp>
|
|
|
|
#endif // auto-linking disabled
|
|
|
|
|
|
|
|
#endif // BOOST_THREAD_CONFIG_WEK1032003_HPP
|
|
|
|
|
|
|
|
// Change Log:
|
|
|
|
// 22 Jan 05 Roland Schwarz (speedsnail)
|
|
|
|
// Usage of BOOST_HAS_DECLSPEC macro.
|
|
|
|
// Default again is static lib usage.
|
|
|
|
// BOOST_DYN_LINK only defined when autolink included.
|