Sha256: ccc4a9dfdc888473b7a3d122920212816ddd9bd117a1f40674594c5266a30b88
Contents?: true
Size: 709 Bytes
Versions: 65
Compression:
Stored size: 709 Bytes
Contents
#include <boost/atomic.hpp> // Copyright (c) 2011 Helge Bahmann // // 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) namespace boost { namespace atomics { namespace detail { static lockpool::lock_type lock_pool_[41]; // NOTE: This function must NOT be inline. Otherwise MSVC 9 will sometimes generate broken code for modulus operation which result in crashes. BOOST_ATOMIC_DECL lockpool::lock_type& lockpool::get_lock_for(const volatile void* addr) { std::size_t index = reinterpret_cast<std::size_t>(addr) % (sizeof(lock_pool_) / sizeof(*lock_pool_)); return lock_pool_[index]; } } } }
Version data entries
65 entries across 65 versions & 1 rubygems