2 // Copyright Oliver Kowalke 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_FIBERS_DETAIL_CONFIG_H
8 #define BOOST_FIBERS_DETAIL_CONFIG_H
12 #include <boost/config.hpp>
13 #include <boost/predef.h>
14 #include <boost/detail/workaround.hpp>
16 #ifdef BOOST_FIBERS_DECL
17 # undef BOOST_FIBERS_DECL
20 #if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FIBERS_DYN_LINK) ) && ! defined(BOOST_FIBERS_STATIC_LINK)
21 # if defined(BOOST_FIBERS_SOURCE)
22 # define BOOST_FIBERS_DECL BOOST_SYMBOL_EXPORT
23 # define BOOST_FIBERS_BUILD_DLL
25 # define BOOST_FIBERS_DECL BOOST_SYMBOL_IMPORT
29 #if ! defined(BOOST_FIBERS_DECL)
30 # define BOOST_FIBERS_DECL
33 #if ! defined(BOOST_FIBERS_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_FIBERS_NO_LIB)
34 # define BOOST_LIB_NAME boost_fiber
35 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FIBERS_DYN_LINK)
36 # define BOOST_DYN_LINK
38 # include <boost/config/auto_link.hpp>
41 #if BOOST_OS_LINUX || BOOST_OS_WINDOWS
42 # define BOOST_FIBERS_HAS_FUTEX
45 #if (!defined(BOOST_FIBERS_HAS_FUTEX) && \
46 (defined(BOOST_FIBERS_SPINLOCK_TTAS_FUTEX) || defined(BOOST_FIBERS_SPINLOCK_TTAS_ADAPTIVE_FUTEX)))
47 # error "futex not supported on this platform"
50 #if !defined(BOOST_FIBERS_CONTENTION_WINDOW_THRESHOLD)
51 # define BOOST_FIBERS_CONTENTION_WINDOW_THRESHOLD 16
54 #if !defined(BOOST_FIBERS_RETRY_THRESHOLD)
55 # define BOOST_FIBERS_RETRY_THRESHOLD 64
58 #if !defined(BOOST_FIBERS_SPIN_BEFORE_SLEEP0)
59 # define BOOST_FIBERS_SPIN_BEFORE_SLEEP0 32
62 #if !defined(BOOST_FIBERS_SPIN_BEFORE_YIELD)
63 # define BOOST_FIBERS_SPIN_BEFORE_YIELD 64
66 #endif // BOOST_FIBERS_DETAIL_CONFIG_H