2 * Copyright Andrey Semashev 2016.
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)
9 * \author Andrey Semashev
12 * \brief This header is the Boost.Log library implementation, see the library documentation
13 * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
16 #ifndef BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
17 #define BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
19 #include <boost/log/detail/config.hpp>
20 #include <boost/log/detail/header.hpp>
22 #ifdef BOOST_HAS_PRAGMA_ONCE
26 #if defined(__INTEL_COMPILER) || defined(_MSC_VER)
28 # define BOOST_LOG_AUX_PAUSE __asm { pause }
29 # elif defined(_M_AMD64)
30 extern "C" void _mm_pause(void);
31 # if defined(BOOST_MSVC)
32 # pragma intrinsic(_mm_pause)
34 # define BOOST_LOG_AUX_PAUSE _mm_pause()
36 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
37 # define BOOST_LOG_AUX_PAUSE __asm__ __volatile__("pause;")
42 BOOST_LOG_OPEN_NAMESPACE
46 BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT
48 #if defined(BOOST_LOG_AUX_PAUSE)
55 BOOST_LOG_CLOSE_NAMESPACE // namespace log
59 #include <boost/log/detail/footer.hpp>
61 #endif // BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_