|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80530 - in trunk: boost boost/atomic boost/atomic/detail libs/atomic/build
From: hartmut.kaiser_at_[hidden]
Date: 2012-09-15 08:44:40
Author: hkaiser
Date: 2012-09-15 08:44:39 EDT (Sat, 15 Sep 2012)
New Revision: 80530
URL: http://svn.boost.org/trac/boost/changeset/80530
Log:
Boost.Atomic: committing MSVC visibility patch, auto-linking and long long fix
Added:
trunk/boost/atomic/config.hpp (contents, props changed)
Text files modified:
trunk/boost/atomic.hpp | 11 +++++++----
trunk/boost/atomic/detail/lockpool.hpp | 5 +++--
trunk/libs/atomic/build/Jamfile.v2 | 3 +++
3 files changed, 13 insertions(+), 6 deletions(-)
Modified: trunk/boost/atomic.hpp
==============================================================================
--- trunk/boost/atomic.hpp (original)
+++ trunk/boost/atomic.hpp 2012-09-15 08:44:39 EDT (Sat, 15 Sep 2012)
@@ -12,6 +12,7 @@
#include <boost/memory_order.hpp>
+#include <boost/atomic/config.hpp>
#include <boost/atomic/platform.hpp>
#include <boost/atomic/detail/type-classifier.hpp>
#include <boost/type_traits/is_signed.hpp>
@@ -114,8 +115,8 @@
typedef atomic<uint64_t> atomic_uint64_t;
typedef atomic<int64_t> atomic_int64_t;
#ifdef BOOST_HAS_LONG_LONG
-typedef atomic<unsigned long long> atomic_ullong;
-typedef atomic<long long> atomic_llong;
+typedef atomic<boost::ulong_long_type> atomic_ullong;
+typedef atomic<boost::long_long_type> atomic_llong;
#endif
typedef atomic<void*> atomic_address;
typedef atomic<bool> atomic_bool;
@@ -161,8 +162,10 @@
typedef atomic<long> atomic_long;
typedef atomic<uint64_t> atomic_uint64_t;
typedef atomic<int64_t> atomic_int64_t;
-typedef atomic<unsigned long long> atomic_ullong;
-typedef atomic<long long> atomic_llong;
+#ifdef BOOST_HAS_LONG_LONG
+typedef atomic<boost::ulong_long_type> atomic_ullong;
+typedef atomic<boost::long_long_type> atomic_llong;
+#endif
typedef atomic<void*> atomic_address;
typedef atomic<bool> atomic_bool;
Added: trunk/boost/atomic/config.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/atomic/config.hpp 2012-09-15 08:44:39 EDT (Sat, 15 Sep 2012)
@@ -0,0 +1,46 @@
+#ifndef BOOST_ATOMIC_CONFIG_HPP
+#define BOOST_ATOMIC_CONFIG_HPP
+
+// Copyright (c) 2012 Hartmut Kaiser
+//
+// 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)
+
+#include <boost/config.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+// Set up dll import/export options
+#if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
+ !defined(BOOST_ATOMIC_STATIC_LINK)
+
+#if defined(BOOST_ATOMIC_SOURCE)
+#define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT
+#define BOOST_ATOMIC_BUILD_DLL
+#else
+#define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT
+#endif
+
+#endif // building a shared library
+
+#ifndef BOOST_ATOMIC_DECL
+#define BOOST_ATOMIC_DECL
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Auto library naming
+#if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
+ !defined(BOOST_ATOMIC_NO_LIB)
+
+#define BOOST_LIB_NAME boost_atomic
+
+// tell the auto-link code to select a dll when required:
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK)
+#define BOOST_DYN_LINK
+#endif
+
+#include <boost/config/auto_link.hpp>
+
+#endif // auto-linking disabled
+
+#endif
Modified: trunk/boost/atomic/detail/lockpool.hpp
==============================================================================
--- trunk/boost/atomic/detail/lockpool.hpp (original)
+++ trunk/boost/atomic/detail/lockpool.hpp 2012-09-15 08:44:39 EDT (Sat, 15 Sep 2012)
@@ -8,6 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
+#include <boost/atomic/config.hpp>
#ifndef BOOST_ATOMIC_FLAG_LOCK_FREE
#include <boost/thread/mutex.hpp>
#endif
@@ -31,7 +32,7 @@
}
};
private:
- static mutex pool_[41];
+ static BOOST_ATOMIC_DECL mutex pool_[41];
static mutex &
lock_for(const volatile void * addr)
@@ -69,7 +70,7 @@
};
private:
- static atomic_flag pool_[41];
+ static BOOST_ATOMIC_DECL atomic_flag pool_[41];
static lock_type &
lock_for(const volatile void * addr)
Modified: trunk/libs/atomic/build/Jamfile.v2
==============================================================================
--- trunk/libs/atomic/build/Jamfile.v2 (original)
+++ trunk/libs/atomic/build/Jamfile.v2 2012-09-15 08:44:39 EDT (Sat, 15 Sep 2012)
@@ -8,6 +8,9 @@
import common ;
project boost/atomic
+ : requirements
+ <link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
+ <define>BOOST_ATOMIC_SOURCE
: source-location ../src
;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk