Sha256: 05a394df8e8891d3d048b88d923578fb0e07695ae9cf0b7462d4c9a8ec3116d2

Contents?: true

Size: 1.08 KB

Versions: 12

Compression:

Stored size: 1.08 KB

Contents

#ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_HPP_INCLUDED

// MS compatible compilers support #pragma once

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif

// boost/smart_ptr/detail/sp_thread_pause.hpp
//
// inline void bost::detail::sp_thread_pause();
//
//   Emits a "pause" instruction.
//
// Copyright 2008, 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// https://www.boost.org/LICENSE_1_0.txt

#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) && !defined(__c2__)

extern "C" void _mm_pause();

#define BOOST_SP_PAUSE _mm_pause();

#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )

#define BOOST_SP_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );

#else

#define BOOST_SP_PAUSE

#endif

namespace boost
{
namespace detail
{

inline void sp_thread_pause()
{
    BOOST_SP_PAUSE
}

} // namespace detail
} // namespace boost

#undef BOOST_SP_PAUSE

#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_HPP_INCLUDED

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp