updated boost on windows
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
// boost lockfree: allocator rebind helper
|
||||
//
|
||||
// Copyright (C) 2017 Minmin Gong
|
||||
//
|
||||
// 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_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
|
||||
#define BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace boost {
|
||||
namespace lockfree {
|
||||
namespace detail {
|
||||
|
||||
template <class allocator_type, class value_type>
|
||||
struct allocator_rebind_helper
|
||||
{
|
||||
#if !defined( BOOST_NO_CXX11_ALLOCATOR )
|
||||
typedef typename std::allocator_traits<allocator_type>::template rebind_alloc<value_type> type;
|
||||
#else
|
||||
typedef typename allocator_type::template rebind<value_type>::other type;
|
||||
#endif
|
||||
};
|
||||
|
||||
} /* namespace detail */
|
||||
} /* namespace lockfree */
|
||||
} /* namespace boost */
|
||||
|
||||
#endif /* BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED */
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
}
|
||||
|
||||
template <bool ThreadSafe>
|
||||
void destruct (tagged_node_handle tagged_ptr)
|
||||
void destruct (tagged_node_handle const & tagged_ptr)
|
||||
{
|
||||
T * n = tagged_ptr.get_ptr();
|
||||
n->~T();
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
void destruct (T * n)
|
||||
{
|
||||
n->~T();
|
||||
deallocate<ThreadSafe>(n - NodeStorage::nodes());
|
||||
deallocate<ThreadSafe>(static_cast<index_t>(n - NodeStorage::nodes()));
|
||||
}
|
||||
|
||||
bool is_lock_free(void) const
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
|
||||
#include <boost/lockfree/detail/allocator_rebind_helper.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace lockfree {
|
||||
@@ -54,7 +56,7 @@ struct extract_allocator
|
||||
std::allocator<T>
|
||||
>::type allocator_arg;
|
||||
|
||||
typedef typename allocator_arg::template rebind<T>::other type;
|
||||
typedef typename detail::allocator_rebind_helper<allocator_arg, T>::type type;
|
||||
};
|
||||
|
||||
template <typename bound_args, bool default_ = false>
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
of the virtual address space as tag (at least 16bit)
|
||||
*/
|
||||
|
||||
// PowerPC caches support 128-byte cache lines.
|
||||
#if defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
|
||||
#if defined(__s390__) || defined(__s390x__)
|
||||
#define BOOST_LOCKFREE_CACHELINE_BYTES 256
|
||||
#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
|
||||
#define BOOST_LOCKFREE_CACHELINE_BYTES 128
|
||||
#else
|
||||
#define BOOST_LOCKFREE_CACHELINE_BYTES 64
|
||||
@@ -22,7 +23,7 @@
|
||||
|
||||
#include <boost/predef.h>
|
||||
|
||||
#ifdef BOOST_ARCH_X86_64
|
||||
#if BOOST_ARCH_X86_64 || defined (__aarch64__)
|
||||
#define BOOST_LOCKFREE_PTR_COMPRESSION 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,7 +21,15 @@ namespace detail {
|
||||
|
||||
|
||||
template <class T>
|
||||
class BOOST_ALIGNMENT(2 * sizeof(void*)) tagged_ptr
|
||||
class
|
||||
#if BOOST_COMP_MSVC && BOOST_ARCH_X86_64
|
||||
BOOST_ALIGNMENT(16)
|
||||
#elif BOOST_COMP_MSVC && BOOST_ARCH_X86_32
|
||||
BOOST_ALIGNMENT(8)
|
||||
#else
|
||||
BOOST_ALIGNMENT(2 * sizeof(void*))
|
||||
#endif
|
||||
tagged_ptr
|
||||
{
|
||||
public:
|
||||
typedef std::size_t tag_t;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace boost {
|
||||
namespace lockfree {
|
||||
namespace detail {
|
||||
|
||||
#ifdef BOOST_ARCH_X86_64
|
||||
#if BOOST_ARCH_X86_64 || defined (__aarch64__)
|
||||
|
||||
template <class T>
|
||||
class tagged_ptr
|
||||
|
||||
Reference in New Issue
Block a user