/usr/include/boost/fiber/detail
NameSizeModeActions
config.hpp18280644editdlrm
context_spinlock_queue.hpp26770644editdlrm
context_spmc_queue.hpp68480644editdlrm
convert.hpp10390644editdlrm
cpu_relax.hpp25540644editdlrm
data.hpp11320644editdlrm
decay_copy.hpp7330644editdlrm
disable_overload.hpp8020644editdlrm
exchange.hpp7340644editdlrm
fss.hpp13930644editdlrm
futex.hpp15560644editdlrm
is_all_same.hpp10220644editdlrm
rtm.hpp17910644editdlrm
spinlock.hpp21680644editdlrm
spinlock_rtm.hpp48450644editdlrm
spinlock_status.hpp4570644editdlrm
spinlock_ttas.hpp52680644editdlrm
spinlock_ttas_adaptive.hpp59440644editdlrm
spinlock_ttas_adaptive_futex.hpp66220644editdlrm
spinlock_ttas_futex.hpp58790644editdlrm
thread_barrier.hpp15400644editdlrm
Edit: /usr/include/boost/fiber/detail/futex.hpp (1556B)
// Copyright Oliver Kowalke 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FIBERS_DETAIL_FUTEX_H #define BOOST_FIBERS_DETAIL_FUTEX_H #include #include #include #if BOOST_OS_LINUX extern "C" { #include #include } #elif BOOST_OS_WINDOWS #include #endif namespace boost { namespace fibers { namespace detail { #if BOOST_OS_LINUX 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); } 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; } 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 BOOST_FORCEINLINE int futex_wake( std::atomic< std::int32_t > * addr) { ::WakeByAddressSingle( static_cast< void * >( addr) ); return 0; } 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; } #else # warn "no futex support on this platform" #endif }}} #endif // BOOST_FIBERS_DETAIL_FUTEX_H