Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/atomic/detail/pause.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
| author | Chris Cannam |
|---|---|
| date | Tue, 30 Jul 2019 12:25:44 +0100 |
| parents | f46d142149f5 |
| children |
| rev | line source |
|---|---|
| Chris@102 | 1 /* |
| Chris@102 | 2 * Distributed under the Boost Software License, Version 1.0. |
| Chris@102 | 3 * (See accompanying file LICENSE_1_0.txt or copy at |
| Chris@102 | 4 * http://www.boost.org/LICENSE_1_0.txt) |
| Chris@102 | 5 * |
| Chris@102 | 6 * (C) Copyright 2013 Tim Blechmann |
| Chris@102 | 7 * (C) Copyright 2013 Andrey Semashev |
| Chris@102 | 8 */ |
| Chris@102 | 9 |
| Chris@102 | 10 #ifndef BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ |
| Chris@102 | 11 #define BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ |
| Chris@102 | 12 |
| Chris@102 | 13 #include <boost/atomic/detail/config.hpp> |
| Chris@102 | 14 |
| Chris@102 | 15 #ifdef BOOST_HAS_PRAGMA_ONCE |
| Chris@102 | 16 #pragma once |
| Chris@102 | 17 #endif |
| Chris@102 | 18 |
| Chris@102 | 19 #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) |
| Chris@102 | 20 extern "C" void _mm_pause(void); |
| Chris@102 | 21 #if defined(BOOST_MSVC) |
| Chris@102 | 22 #pragma intrinsic(_mm_pause) |
| Chris@102 | 23 #endif |
| Chris@102 | 24 #endif |
| Chris@102 | 25 |
| Chris@102 | 26 namespace boost { |
| Chris@102 | 27 namespace atomics { |
| Chris@102 | 28 namespace detail { |
| Chris@102 | 29 |
| Chris@102 | 30 BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT |
| Chris@102 | 31 { |
| Chris@102 | 32 #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) |
| Chris@102 | 33 _mm_pause(); |
| Chris@102 | 34 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) |
| Chris@102 | 35 __asm__ __volatile__("pause;"); |
| Chris@102 | 36 #endif |
| Chris@102 | 37 } |
| Chris@102 | 38 |
| Chris@102 | 39 } // namespace detail |
| Chris@102 | 40 } // namespace atomics |
| Chris@102 | 41 } // namespace boost |
| Chris@102 | 42 |
| Chris@102 | 43 #endif // BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ |
