diff options
Diffstat (limited to 'boost/fiber/detail/futex.hpp')
-rw-r--r-- | boost/fiber/detail/futex.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/boost/fiber/detail/futex.hpp b/boost/fiber/detail/futex.hpp index d383dc4077..e64bd5990d 100644 --- a/boost/fiber/detail/futex.hpp +++ b/boost/fiber/detail/futex.hpp @@ -18,7 +18,7 @@ extern "C" { #include <sys/syscall.h> } #elif BOOST_OS_WINDOWS -#include <Windows.h> +#include <windows.h> #endif namespace boost { @@ -26,28 +26,28 @@ namespace fibers { namespace detail { #if BOOST_OS_LINUX -inline +BOOST_FORCEINLINE int sys_futex( void * addr, std::int32_t op, std::int32_t x) { return ::syscall( SYS_futex, addr, op, x, nullptr, nullptr, 0); } -inline +BOOST_FORCEINLINE int futex_wake( std::atomic< std::int32_t > * addr) { return 0 <= sys_futex( static_cast< void * >( addr), FUTEX_WAKE_PRIVATE, 1) ? 0 : -1; } -inline +BOOST_FORCEINLINE int futex_wait( std::atomic< std::int32_t > * addr, std::int32_t x) { return 0 <= sys_futex( static_cast< void * >( addr), FUTEX_WAIT_PRIVATE, x) ? 0 : -1; } #elif BOOST_OS_WINDOWS -inline +BOOST_FORCEINLINE int futex_wake( std::atomic< std::int32_t > * addr) { ::WakeByAddressSingle( static_cast< void * >( addr) ); return 0; } -inline +BOOST_FORCEINLINE int futex_wait( std::atomic< std::int32_t > * addr, std::int32_t x) { ::WaitOnAddress( static_cast< volatile void * >( addr), & x, sizeof( x), INFINITE); return 0; |