From 7d70691a16ae4a6c06eaafef55e50459eae774d1 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 8 Jan 2020 03:09:11 +0200 Subject: [PATCH] Remove Windows Runtime workaround from yield_k.hpp; it's no longer relevant, Sleep is available --- include/boost/smart_ptr/detail/yield_k.hpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/include/boost/smart_ptr/detail/yield_k.hpp b/include/boost/smart_ptr/detail/yield_k.hpp index e9c41b9..fa25917 100644 --- a/include/boost/smart_ptr/detail/yield_k.hpp +++ b/include/boost/smart_ptr/detail/yield_k.hpp @@ -11,7 +11,6 @@ // yield_k.hpp // // Copyright (c) 2008 Peter Dimov -// Copyright (c) Microsoft Corporation 2014 // // void yield( unsigned k ); // @@ -25,11 +24,6 @@ // #include -#include - -#if BOOST_PLAT_WINDOWS_RUNTIME -#include -#endif // BOOST_SMT_PAUSE @@ -59,7 +53,7 @@ namespace boost namespace detail { -#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME +#if !defined( BOOST_USE_WINDOWS_H ) #if defined(__clang__) && defined(__x86_64__) // clang x64 warns that __stdcall is ignored @@ -76,7 +70,7 @@ namespace detail #undef BOOST_SP_STDCALL -#endif // !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME +#endif // !defined( BOOST_USE_WINDOWS_H ) inline void yield( unsigned k ) BOOST_NOEXCEPT { @@ -89,7 +83,6 @@ inline void yield( unsigned k ) BOOST_NOEXCEPT BOOST_SMT_PAUSE } #endif -#if !BOOST_PLAT_WINDOWS_RUNTIME else if( k < 32 ) { Sleep( 0 ); @@ -98,13 +91,6 @@ inline void yield( unsigned k ) BOOST_NOEXCEPT { Sleep( 1 ); } -#else - else - { - // Sleep isn't supported on the Windows Runtime. - std::this_thread::yield(); - } -#endif } } // namespace detail