update boost
This commit is contained in:
@@ -47,7 +47,7 @@ namespace detail {
|
||||
# else
|
||||
# define cpu_relax() asm volatile ("nop" ::: "memory");
|
||||
# endif
|
||||
#elif BOOST_ARCH_MIPS
|
||||
#elif BOOST_ARCH_MIPS && (((__mips_isa_rev > 1) && defined(__mips32)) || ((__mips_isa_rev > 2) && defined(__mips64)))
|
||||
# define cpu_relax() asm volatile ("pause" ::: "memory");
|
||||
#elif BOOST_ARCH_PPC
|
||||
// http://code.metager.de/source/xref/gnu/glibc/sysdeps/powerpc/sys/platform/ppc.h
|
||||
|
||||
@@ -30,7 +30,7 @@ private:
|
||||
public:
|
||||
typedef intrusive_ptr< fss_cleanup_function > ptr_t;
|
||||
|
||||
fss_cleanup_function() noexcept = default;
|
||||
fss_cleanup_function() = default;
|
||||
|
||||
virtual ~fss_cleanup_function() = default;
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
|
||||
#include <boost/fiber/detail/config.hpp>
|
||||
|
||||
#ifndef SYS_futex
|
||||
#define SYS_futex SYS_futex_time64
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
extern "C" {
|
||||
#include <linux/futex.h>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef BOOST_FIBERS_SPINLOCK_RTM_H
|
||||
#define BOOST_FIBERS_SPINLOCK_RTM_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef BOOST_FIBERS_SPINLOCK_TTAS_H
|
||||
#define BOOST_FIBERS_SPINLOCK_TTAS_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
@@ -64,6 +65,7 @@ public:
|
||||
// -> prevent pipeline stalls
|
||||
cpu_relax();
|
||||
} else if ( BOOST_FIBERS_SPIN_BEFORE_YIELD > retries) {
|
||||
++retries;
|
||||
// std::this_thread::sleep_for( 0us) has a fairly long instruction path length,
|
||||
// combined with an expensive ring3 to ring 0 transition costing about 1000 cycles
|
||||
// std::this_thread::sleep_for( 0us) lets give up this_thread the remaining part of its time slice
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef BOOST_FIBERS_SPINLOCK_TTAS_ADAPTIVE_H
|
||||
#define BOOST_FIBERS_SPINLOCK_TTAS_ADAPTIVE_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef BOOST_FIBERS_SPINLOCK_TTAS_ADAPTIVE_FUTEX_H
|
||||
#define BOOST_FIBERS_SPINLOCK_TTAS_ADAPTIVE_FUTEX_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef BOOST_FIBERS_spinlock_ttas_futex_FUTEX_H
|
||||
#define BOOST_FIBERS_spinlock_ttas_futex_FUTEX_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
|
||||
@@ -51,9 +51,8 @@ public:
|
||||
lk.unlock(); // no pessimization
|
||||
cond_.notify_all();
|
||||
return true;
|
||||
} else {
|
||||
cond_.wait( lk, [&](){ return cycle != cycle_; });
|
||||
}
|
||||
cond_.wait( lk, [&](){ return cycle != cycle_; });
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user