mirror of
https://github.com/boostorg/core.git
synced 2025-05-09 23:03:54 +00:00
Add noexcept to yield primitives
This commit is contained in:
parent
23ef6d3531
commit
0e71b6158d
@ -17,6 +17,8 @@
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(__has_builtin)
|
||||
# if __has_builtin(__builtin_ia32_pause) && !defined(_INTEL_COMPILER)
|
||||
# define BOOST_CORE_HAS_BUILTIN_IA32_PAUSE
|
||||
@ -56,7 +58,7 @@ namespace boost
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline void sp_thread_pause()
|
||||
BOOST_FORCEINLINE void sp_thread_pause() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_CORE_SP_PAUSE();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace core
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline void sp_thread_sleep()
|
||||
inline void sp_thread_sleep() BOOST_NOEXCEPT
|
||||
{
|
||||
Sleep( 1 );
|
||||
}
|
||||
@ -65,7 +65,7 @@ namespace boost
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline void sp_thread_sleep()
|
||||
inline void sp_thread_sleep() BOOST_NOEXCEPT
|
||||
{
|
||||
#if defined(BOOST_HAS_PTHREADS)
|
||||
|
||||
@ -109,7 +109,7 @@ namespace boost
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline void sp_thread_sleep()
|
||||
inline void sp_thread_sleep() BOOST_NOEXCEPT
|
||||
{
|
||||
sp_thread_yield();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace core
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline void sp_thread_yield()
|
||||
inline void sp_thread_yield() BOOST_NOEXCEPT
|
||||
{
|
||||
Sleep( 0 );
|
||||
}
|
||||
@ -66,7 +66,7 @@ namespace boost
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline void sp_thread_yield()
|
||||
inline void sp_thread_yield() BOOST_NOEXCEPT
|
||||
{
|
||||
sched_yield();
|
||||
}
|
||||
@ -87,7 +87,7 @@ namespace boost
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline void sp_thread_yield()
|
||||
inline void sp_thread_yield() BOOST_NOEXCEPT
|
||||
{
|
||||
sp_thread_pause();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user