File indexing completed on 2025-01-18 09:39:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
0017 #define BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
0018
0019 #include <boost/log/detail/config.hpp>
0020 #include <boost/log/detail/header.hpp>
0021
0022 #ifdef BOOST_HAS_PRAGMA_ONCE
0023 #pragma once
0024 #endif
0025
0026 #if defined(__INTEL_COMPILER) || defined(_MSC_VER)
0027 # if defined(_M_IX86)
0028 # define BOOST_LOG_AUX_PAUSE __asm { pause }
0029 # elif defined(_M_AMD64)
0030 extern "C" void _mm_pause(void);
0031 # if defined(BOOST_MSVC)
0032 # pragma intrinsic(_mm_pause)
0033 # endif
0034 # define BOOST_LOG_AUX_PAUSE _mm_pause()
0035 # endif
0036 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
0037 # define BOOST_LOG_AUX_PAUSE __asm__ __volatile__("pause;")
0038 #endif
0039
0040 namespace boost {
0041
0042 BOOST_LOG_OPEN_NAMESPACE
0043
0044 namespace aux {
0045
0046 BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT
0047 {
0048 #if defined(BOOST_LOG_AUX_PAUSE)
0049 BOOST_LOG_AUX_PAUSE;
0050 #endif
0051 }
0052
0053 }
0054
0055 BOOST_LOG_CLOSE_NAMESPACE
0056
0057 }
0058
0059 #include <boost/log/detail/footer.hpp>
0060
0061 #endif