|
Boost-Commit : |
From: matt_calabrese_at_[hidden]
Date: 2007-06-28 14:13:22
Author: matt_calabrese
Date: 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
New Revision: 7298
URL: http://svn.boost.org/trac/boost/changeset/7298
Log:
Added:
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default.hpp
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default_fwd.hpp
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/type_traits/is_semantics.hpp
Removed:
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/cas_support_data.hpp
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered.hpp
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered_fwd.hpp
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_fully_ordered.hpp
Properties modified:
sandbox/SOC/2006/concurrency/trunk/libs/act/test/ (props changed)
Text files modified:
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign.hpp | 19 +++++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_fwd.hpp | 14 ++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp | 19 +++++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel_fwd.hpp | 16 ++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire_fwd.hpp | 17 +++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_fwd.hpp | 15 +++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release_fwd.hpp | 16 ++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered_fwd.hpp | 16 ++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_release_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_unordered_default | 4 +-
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp | 33 ++++++++++++++++++++++++++--
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp | 34 ++++++++++++++++++-----------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel_fwd.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire_fwd.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp | 22 +++++++++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release_fwd.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered_fwd.hpp | 30 ++++++++++++++++---------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default | 3 -
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_unordered_default | 9 +++++--
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp | 13 ++++++----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp | 14 +++++++----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default | 9 ++++---
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default | 9 ++++---
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/detail/load_unordered_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load.hpp | 8 ++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire.hpp | 46 ++++++++++++++++++++++++++++++++++++---
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire_fwd.hpp | 35 ++++++++++++++++++++++++++---
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_fwd.hpp | 6 +++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered_fwd.hpp | 35 ++++++++++++++++++++++++++---
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics.hpp | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acq_rel_fwd.hpp | 6 ++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acquire_fwd.hpp | 6 ++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/release_fwd.hpp | 6 ++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/unordered_fwd.hpp | 6 ++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics_fwd.hpp | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/detail/store_unordered_default | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store.hpp | 2
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release_fwd.hpp | 16 ++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered.hpp | 18 +++++++++------
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered_fwd.hpp | 16 ++++++++-----
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign.hpp | 18 ++++++++++++++
sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_fwd.hpp | 14 ++++++++++++
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign.cpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_acquire.cpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_helper.hpp | 15 ++++++------
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_release.cpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_release.cpp | 17 +++++++------
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_unordered.cpp | 17 +++++++------
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/store_load_helper.hpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign.cpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_acquire.cpp | 2
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_helper.hpp | 20 +++++++++-------
sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_release.cpp | 2
65 files changed, 666 insertions(+), 271 deletions(-)
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( add_assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/act/interlocked/add_assign/add_assign_acq_rel.hpp>
@@ -30,8 +33,22 @@
::type
add_assign( TargetType& destination, SourceType const& new_value )
{
- return interlocked::add_assign_acq_rel( destination, new_value );
+ return interlocked::add_assign< acq_rel >( destination, new_value );
+}
+
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_< is_same< Semantics, default_ >
+ , detail::are_valid_additive_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+add_assign( TargetType& destination, SourceType const& new_value )
+{
+ return interlocked::add_assign< acq_rel >( destination, new_value );
}
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( add_assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
@@ -30,6 +33,17 @@
::type
add_assign( TargetType& destination, SourceType const& new_value );
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_< is_same< Semantics, default_ >
+ , detail::are_valid_additive_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+add_assign( TargetType& destination, SourceType const& new_value );
+
} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/act/interlocked/assign/assign_acq_rel.hpp>
@@ -30,8 +33,22 @@
::type
assign( TargetType& destination, SourceType const& new_value )
{
- return interlocked::assign_acq_rel( destination, new_value );
+ return interlocked::assign< acq_rel >( destination, new_value );
+}
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_
+ < is_same< Semantics, default_ >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+assign( TargetType& destination, SourceType const& new_value )
+{
+ return interlocked::assign< acq_rel >( destination, new_value );
}
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acq_rel )
+#include <boost/act/interlocked/semantics/acq_rel.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,42 +37,44 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_acq_rel( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
return detail::impl_meta< detail::assign_acq_rel_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_acq_rel( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_acq_rel
+ interlocked::assign< acq_rel >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
)
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acq_rel_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acq_rel )
+#include <boost/act/interlocked/semantics/acq_rel.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,31 +26,33 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_acq_rel( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_acq_rel( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acquire )
+#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,42 +37,44 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_acquire( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
return detail::impl_meta< detail::assign_acquire_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_acquire( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_acquire
+ interlocked::assign< acquire >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
)
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,10 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acquire )
+#include <boost/act/interlocked/semantics/acquire.hpp>
+
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,31 +27,33 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_acquire( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_acquire( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
@@ -30,6 +33,18 @@
::type
assign( TargetType& destination, SourceType const& new_value );
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_
+ < is_same< Semantics, default_ >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+assign( TargetType& destination, SourceType const& new_value );
+
} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,42 +37,44 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_release( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
return detail::impl_meta< detail::assign_release_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_release( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_release
+ interlocked::assign< release >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
)
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_release_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,31 +26,33 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_release( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_release( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,42 +37,44 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_unordered( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
return detail::impl_meta< detail::assign_unordered_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_unordered( TargetType& destination, SourceType const& new_value )
+assign( TargetType& destination, SourceType const& new_value )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_unordered
+ interlocked::assign< unordered >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
)
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_unordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,31 +26,33 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-assign_unordered( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_unordered( TargetType& destination, SourceType const& new_value );
+assign( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -20,7 +20,7 @@
static typename remove_cv< LeftType >::type
execute( LeftType& left, RightType& right )
{
- return interlocked::assign_acq_rel( left, right );
+ return interlocked::assign< acq_rel >( left, right );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_release_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_release_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_release_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -20,7 +20,7 @@
static typename remove_cv< LeftType >::type
execute( LeftType& left, RightType& right )
{
- return interlocked::assign_acq_rel( left, right );
+ return interlocked::assign< acq_rel >( left, right );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_unordered_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_unordered_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_unordered_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -16,13 +16,13 @@
#include <boost/act/interlocked/assign/assign_acquire.hpp>
-#define BOOST_ACT_INTERLOCKED_ASSIGN_DETAIL_UNORDERED_IMPL assign_acquire
+#define BOOST_ACT_INTERLOCKED_ASSIGN_DETAIL_UNORDERED_IMPL assign< acquire >
#elif BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL( assign, release )
#include <boost/act/interlocked/assign/assign_release.hpp>
-#define BOOST_ACT_INTERLOCKED_ASSIGN_DETAIL_UNORDERED_IMPL assign_release
+#define BOOST_ACT_INTERLOCKED_ASSIGN_DETAIL_UNORDERED_IMPL assign< release >
#elif BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL( assign, acq_rel )
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
@@ -34,9 +37,33 @@
, ConditionType const& expected_value
)
{
- return interlocked::assign_if_was_acq_rel( destination, new_value
- , expected_value
- );
+ return interlocked::assign_if_was< acq_rel >( destination, new_value
+ , expected_value
+ );
+}
+
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
+typename lazy_enable_if
+<
+ mpl::and_
+ <
+ is_same< Semantics, default_ >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
+ , ConditionType const
+ >
+ >
+, remove_cv< TargetType >
+>
+::type
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
+{
+ return interlocked::assign_if_was< acq_rel >( destination, new_value
+ , expected_value
+ );
}
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, acq_rel )
+#include <boost/act/interlocked/semantics/acq_rel.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,12 +37,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -48,36 +53,39 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acq_rel( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
return detail::impl_meta< detail::assign_if_was_acq_rel_impl, TargetType >
::execute( destination, new_value, expected_value );
}
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
- , ConditionType const
- >
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
+ , ConditionType const
+ >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-assign_if_was_acq_rel( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_if_was_acq_rel
+ interlocked::assign_if_was< acq_rel >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
, static_cast< bool >( expected_value )
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acq_rel_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,8 +13,10 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, acq_rel )
+#include <boost/act/interlocked/semantics/acq_rel.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,12 +26,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -37,16 +42,19 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acq_rel( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
-
-template< typename TargetType, typename SourceType, typename ConditionType >
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
+
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acq_rel >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -54,9 +62,9 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acq_rel( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, acquire )
+#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,12 +37,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -48,20 +53,23 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acquire( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
return detail::impl_meta< detail::assign_if_was_acquire_impl, TargetType >
::execute( destination, new_value, expected_value );
}
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -69,15 +77,15 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acquire( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_if_was_acquire
+ interlocked::assign_if_was< acquire >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
, static_cast< bool >( expected_value )
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,8 +13,10 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, acquire )
+#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,12 +26,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -37,16 +42,19 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acquire( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
-
-template< typename TargetType, typename SourceType, typename ConditionType >
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
+
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -54,9 +62,9 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_acquire( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
@@ -33,6 +36,25 @@
, ConditionType const& expected_value
);
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
+typename lazy_enable_if
+<
+ mpl::and_
+ <
+ is_same< Semantics, default_ >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
+ , ConditionType const
+ >
+ >
+, remove_cv< TargetType >
+>
+::type
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
+
} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,12 +37,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -48,20 +53,23 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_release( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
return detail::impl_meta< detail::assign_if_was_release_impl, TargetType >
::execute( destination, new_value, expected_value );
}
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -69,15 +77,15 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_release( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_if_was_release
+ interlocked::assign_if_was< release >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
, static_cast< bool >( expected_value )
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,8 +13,10 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,12 +26,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -37,16 +42,19 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_release( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
-
-template< typename TargetType, typename SourceType, typename ConditionType >
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
+
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -54,9 +62,9 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_release( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,12 +37,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -48,20 +53,23 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_unordered( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
return detail::impl_meta< detail::assign_if_was_unordered_impl, TargetType >
::execute( destination, new_value, expected_value );
}
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -69,15 +77,15 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_unordered( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- )
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::assign_if_was_unordered
+ interlocked::assign_if_was< unordered >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
, static_cast< bool >( expected_value )
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_unordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,8 +13,10 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( assign_if_was, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,12 +26,15 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType, typename ConditionType >
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, mpl::not_< detail::is_interlocked_bool< TargetType > >
@@ -37,16 +42,19 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_unordered( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
-
-template< typename TargetType, typename SourceType, typename ConditionType >
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
+
+template< typename Semantics
+ , typename TargetType, typename SourceType, typename ConditionType
+ >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const
, ConditionType const
>
, detail::is_interlocked_bool< TargetType >
@@ -54,9 +62,9 @@
, remove_cv< TargetType >
>
::type
-assign_if_was_unordered( TargetType& destination, SourceType const& new_value
- , ConditionType const& expected_value
- );
+assign_if_was( TargetType& destination, SourceType const& new_value
+ , ConditionType const& expected_value
+ );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -20,11 +20,10 @@
static typename boost::remove_cv< LeftType >::type
execute( LeftType& left, RightType& right, OldType& old )
{
- return interlocked::assign_if_was_acq_rel( left, right, old );
+ return interlocked::assign_if_was< acq_rel >( left, right, old );
}
};
-
} } } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -20,7 +20,7 @@
static typename boost::remove_cv< LeftType >::type
execute( LeftType& left, RightType& right, OldType& old )
{
- return interlocked::assign_if_was_acq_rel( left, right, old );
+ return interlocked::assign_if_was< acq_rel >( left, right, old );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_unordered_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_unordered_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_unordered_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -16,19 +16,22 @@
#include <boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp>
-#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL assign_if_was_acquire
+#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL \
+assign_if_was< acquire >
#elif BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL( assign_if_was, release )
#include <boost/act/interlocked/assign_if_was/assign_if_was_release.hpp>
-#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL assign_if_was_release
+#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL \
+assign_if_was< release >
#elif BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL( assign_if_was, acq_rel )
#include <boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp>
-#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL assign_if_was_acq_rel
+#define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_UN_IMPL \
+assign_if_was< acq_rel >
#else
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -26,7 +26,7 @@
unqualified_type new_value;
for( unqualified_type curr_value = load( target )
- ; ( new_value = assign_if_was_release
+ ; ( new_value = assign_if_was< release >
( target
, act::detail::prior( curr_value )
, curr_value
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -15,6 +15,8 @@
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/act/interlocked/semantics.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -50,12 +52,13 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename OperandType >
+template< typename Semantics, typename TargetType, typename OperandType >
typename lazy_enable_if
<
mpl::and_
<
- detail::
+ is_same< Semantics, BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_SEMANTICS >
+ , detail::
#if BOOST_ACT_INTERLOCKED_DETAIL_BINARY_FORWARDER_IS_ADDITIVE
are_valid_additive_params
#else
@@ -67,9 +70,9 @@
, remove_cv< TargetType >
>
::type
-BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME( TargetType& target
- , OperandType const& operand
- )
+BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_SHORT_NAME( TargetType& target
+ , OperandType const& operand
+ )
{
return detail::impl_meta
<
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -14,6 +14,8 @@
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/act/interlocked/semantics.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -44,12 +46,13 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename OperandType >
+template< typename Semantics, typename TargetType, typename OperandType >
typename lazy_enable_if
<
mpl::and_
<
- detail::
+ is_same< Semantics, BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_SEMANTICS >
+ , detail::
#if BOOST_ACT_INTERLOCKED_DETAIL_BINARY_FORWARDER_FWD_IS_ADDITIVE
are_valid_additive_params
#else
@@ -61,9 +64,10 @@
, remove_cv< TargetType >
>
::type
-BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_FULL_NAME( TargetType& target
- , OperandType const& operand
- );
+BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_SHORT_NAME
+( TargetType& target
+, OperandType const& operand
+);
} } }
Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/cas_support_data.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/cas_support_data.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
+++ (empty file)
@@ -1,92 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to 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_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA_HPP
-#define BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA_HPP
-
-// Note: BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT has the form
-//
-// ( name, valid_bit_count_for_cas, cas_return, load_info
-// , custom_implementations
-// )
-//
-// Where valid_bit_count_for_cas is a Boost.Preprocessor sequence of object
-// sizes in bits which may be used with the underlying cas operation
-//
-// Where cas_return is either:
-// old_value, meaning the old value is returned from assign_if_was_impl
-// -or-
-// success_value, meaning it returns true if the operation was successful
-//
-// Where load_info is either:
-// volatile_load, meaning interlocked::load is automatically
-// implemented to access the passed object with added volatile qualification
-// -or-
-// custom_load, meaning interlocked::load does not have a default
-// implementation and must be provided by the implementor
-//
-// Where custom_implementations is a preprocessor sequence of tuples of the form
-// ( function_name, semantice_sequence )
-// Where function_name is the name of a function with a custom implmentation
-//
-// Where semantic_sequence is a sequence whose elements are each one of:
-// acquire, meanining there is an implementation for acquire semantics
-// -or-
-// release, meanining there is an one for release semantics
-// -or-
-// full_fence, meanining there is one for full barrier semantics
-//
-
-#include <boost/config.hpp>
-
-#ifdef BOOST_WINDOWS
-
- #include <windows.h>
-
- // ToDo: Only use volatile_load if VC 8.0 or higher
-
- #if WINVER < 0x0600 // Windows prior to vista
-
- // Note: Same name as vista windows on purpose
- #define BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA \
- ( windows,(32),old_value,volatile_load \
- , ( ( assign, ( full_fence ) ) ) \
- ( ( assign_if_was, ( full_fence ) ) ) \
- )
-
- #else // Windows Vista and higher
-
- // Note: Same name as pre-vista windows on purpose
- #define BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA \
- ( windows,(32)(64),old_value,volatile_load \
- , ( ( assign, ( full_fence )( acquire ) ) ) \
- ( ( assign_if_was, ( full_fence )( acquire )( release ) ) ) \
- )
-
- #endif // End WINVER checks
-
-#elif defined( __GNUC__ )
-
- #if defined( __i386__ )
-
- // Note: Same name as x64 on purpose
- #define BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA \
- ( gcc_x86,(32),old_value,volatile_load \
- , ( ( assign, ( full_fence ) ) ) \
- ( ( assign_if_was, ( full_fence ) ) ) \
- )
-
- #elif defined( __x86_64__ )
-
- #error GCC not supported for 64-bit.
-
- #endif
-
-#endif // End OS checks
-
-#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -26,10 +26,11 @@
unqualified_type new_value;
for( unqualified_type curr_value = load( target )
- ; ( new_value = assign_if_was_acquire( target
- , act::detail::next( curr_value )
- , curr_value
- )
+ ; ( new_value = assign_if_was< acquire >
+ ( target
+ , act::detail::next( curr_value )
+ , curr_value
+ )
)
!= curr_value
; curr_value = new_value
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -26,10 +26,11 @@
unqualified_type new_value;
for( unqualified_type curr_value = load( target )
- ; ( new_value = assign_if_was_release( target
- , act::detail::next( curr_value )
- , curr_value
- )
+ ; ( new_value = assign_if_was< release >
+ ( target
+ , act::detail::next( curr_value )
+ , curr_value
+ )
)
!= curr_value
; curr_value = new_value
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/detail/load_unordered_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/detail/load_unordered_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/detail/load_unordered_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -42,7 +42,7 @@
static typename remove_cv< TargetType >::type execute( TargetType& target )
{
// ToDo: Look ahead for load_acquire_support and produce error here
- return interlocked::load_acquire( target );
+ return interlocked::load< acquire >( target );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_LOAD_LOAD_HPP
#define BOOST_ACT_INTERLOCKED_LOAD_LOAD_HPP
+#include <boost/act/config/interlocked/has.hpp>
+
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, acquire )
+
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
@@ -25,9 +29,11 @@
::type
load( TargetType const& target )
{
- return interlocked::load_acquire( target );
+ return interlocked::load< acquire >( target );
}
} } }
#endif
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,8 +9,14 @@
#ifndef BOOST_ACT_INTERLOCKED_LOAD_LOAD_ACQUIRE_HPP
#define BOOST_ACT_INTERLOCKED_LOAD_LOAD_ACQUIRE_HPP
+#include <boost/act/config/interlocked/has.hpp>
+
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, acquire )
+
+#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
@@ -31,18 +37,50 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType >
+template< typename Semantics, typename TargetType >
typename lazy_enable_if
<
- detail::are_valid_store_style_params< TargetType >
-, remove_volatile< TargetType >
+ mpl::and_
+ <
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType >
+ , mpl::not_< detail::is_interlocked_bool< TargetType > >
+ >
+, remove_cv< TargetType >
>
::type
-load_acquire( TargetType const& target )
+load( TargetType const& target )
{
return detail::load_acquire_impl::execute( target );
}
+template< typename Semantics, typename TargetType >
+typename lazy_enable_if
+<
+ mpl::and_
+ <
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType >
+ , detail::is_interlocked_bool< TargetType >
+ >
+, remove_cv< TargetType >
+>
+::type
+load( TargetType const& target )
+{
+ typedef typename remove_cv< TargetType >::type result_type;
+
+ return result_type
+ (
+ interlocked::load< acquire >
+ ( interlocked_bool_internal_value( target )
+ )
+ != 0
+ );
+}
+
} } }
#endif
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_acquire_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,20 +9,47 @@
#ifndef BOOST_ACT_INTERLOCKED_LOAD_LOAD_ACQUIRE_FWD_HPP
#define BOOST_ACT_INTERLOCKED_LOAD_LOAD_ACQUIRE_FWD_HPP
+#include <boost/act/config/interlocked/has.hpp>
+
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, acquire )
+
+#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/is_same.hpp>
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType >
+template< typename Semantics, typename TargetType >
typename lazy_enable_if
<
- detail::are_valid_store_style_params< TargetType >
-, remove_volatile< TargetType >
+ mpl::and_
+ <
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType >
+ , mpl::not_< detail::is_interlocked_bool< TargetType > >
+ >
+, remove_cv< TargetType >
>
::type
-load_acquire( TargetType const& target );
+load( TargetType const& target );
+
+template< typename Semantics, typename TargetType >
+typename lazy_enable_if
+<
+ mpl::and_
+ <
+ is_same< Semantics, acquire >
+ , detail::are_valid_store_style_params< TargetType >
+ , detail::is_interlocked_bool< TargetType >
+ >
+, remove_cv< TargetType >
+>
+::type
+load( TargetType& destination );
} } }
#endif
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_LOAD_LOAD_FWD_HPP
#define BOOST_ACT_INTERLOCKED_LOAD_LOAD_FWD_HPP
+#include <boost/act/config/interlocked/has.hpp>
+
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, acquire )
+
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
@@ -26,3 +30,5 @@
} } }
#endif
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,9 +13,11 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -35,42 +37,44 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType >
+template< typename Semantics, typename TargetType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
, remove_cv< TargetType >
>
::type
-load_unordered( TargetType& destination )
+load( TargetType& destination )
{
return detail::impl_meta< detail::load_unordered_impl, TargetType >
::execute( destination );
}
-template< typename TargetType >
+template< typename Semantics, typename TargetType >
typename lazy_enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType >
, detail::is_interlocked_bool< TargetType >
>
, remove_cv< TargetType >
>
::type
-load_unordered( TargetType& destination )
+load( TargetType& destination )
{
typedef typename remove_cv< TargetType >::type result_type;
return result_type
(
- interlocked::load_unordered
+ interlocked::load< unordered >
( interlocked_bool_internal_value( destination )
)
!= 0
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/load/load_unordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,20 +9,47 @@
#ifndef BOOST_ACT_INTERLOCKED_LOAD_LOAD_UNORDERED_FWD_HPP
#define BOOST_ACT_INTERLOCKED_LOAD_LOAD_UNORDERED_FWD_HPP
+#include <boost/act/config/interlocked/has.hpp>
+
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( load, unordered )
+
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/is_same.hpp>
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType >
+template< typename Semantics, typename TargetType >
typename lazy_enable_if
<
- detail::are_valid_store_style_params< TargetType >
-, remove_volatile< TargetType >
+ mpl::and_
+ <
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType >
+ , mpl::not_< detail::is_interlocked_bool< TargetType > >
+ >
+, remove_cv< TargetType >
>
::type
-load_unordered( TargetType const& target );
+load( TargetType const& target );
+
+template< typename Semantics, typename TargetType >
+typename lazy_enable_if
+<
+ mpl::and_
+ <
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType >
+ , detail::is_interlocked_bool< TargetType >
+ >
+, remove_cv< TargetType >
+>
+::type
+load( TargetType& destination );
} } }
#endif
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -12,7 +12,7 @@
#include <boost/act/interlocked/semantics/acquire.hpp>
#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/act/interlocked/semantics/acq_rel.hpp>
-#include <boost/act/interlocked/semantics/acq_rel.hpp>
#include <boost/act/interlocked/semantics/unordered.hpp>
+#include <boost/act/interlocked/semantics/default.hpp>
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acq_rel_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acq_rel_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acq_rel_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_FWD_HPP
#define BOOST_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_FWD_HPP
-namespace boost { namespace act { namespace interlocked { struct acq_rel; } } }
+namespace boost { namespace act { namespace interlocked {
+
+struct acq_rel {};
+
+} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acquire_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acquire_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/acquire_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_SEMANTICS_ACQUIRE_FWD_HPP
#define BOOST_ACT_INTERLOCKED_SEMANTICS_ACQUIRE_FWD_HPP
-namespace boost { namespace act { namespace interlocked { struct acquire; } } }
+namespace boost { namespace act { namespace interlocked {
+
+struct acquire {};
+
+} } }
#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to 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_ACT_INTERLOCKED_SEMANTICS_DEFAULT_HPP
+#define BOOST_ACT_INTERLOCKED_SEMANTICS_DEFAULT_HPP
+
+#include <boost/act/interlocked/semantics/default_fwd.hpp>
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/default_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to 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_ACT_INTERLOCKED_SEMANTICS_DEFAULT_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_SEMANTICS_DEFAULT_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+struct default_ {};
+
+} } }
+
+#endif
Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
+++ (empty file)
@@ -1,14 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to 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_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_HPP
-#define BOOST_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_HPP
-
-#include <boost/act/interlocked/semantics/acq_rel_fwd.hpp>
-
-#endif
Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/fully_ordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
+++ (empty file)
@@ -1,18 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to 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_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_FWD_HPP
-#define BOOST_ACT_INTERLOCKED_SEMANTICS_ACQ_REL_FWD_HPP
-
-namespace boost { namespace act { namespace interlocked {
-
-struct acq_rel;
-
-} } }
-
-#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/release_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/release_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/release_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_SEMANTICS_RELEASE_FWD_HPP
#define BOOST_ACT_INTERLOCKED_SEMANTICS_RELEASE_FWD_HPP
-namespace boost { namespace act { namespace interlocked { struct release; } } }
+namespace boost { namespace act { namespace interlocked {
+
+struct release {};
+
+} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/unordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/unordered_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics/unordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -9,6 +9,10 @@
#ifndef BOOST_ACT_INTERLOCKED_SEMANTICS_UNORDERED_FWD_HPP
#define BOOST_ACT_INTERLOCKED_SEMANTICS_UNORDERED_FWD_HPP
-namespace boost { namespace act { namespace interlocked { struct unordered; } } }
+namespace boost { namespace act { namespace interlocked {
+
+struct unordered {};
+
+} } }
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/semantics_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -12,7 +12,7 @@
#include <boost/act/interlocked/semantics/acquire_fwd.hpp>
#include <boost/act/interlocked/semantics/release_fwd.hpp>
#include <boost/act/interlocked/semantics/acq_rel_fwd.hpp>
-#include <boost/act/interlocked/semantics/acq_rel_fwd.hpp>
#include <boost/act/interlocked/semantics/unordered_fwd.hpp>
+#include <boost/act/interlocked/semantics/default_fwd.hpp>
#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/detail/store_unordered_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/detail/store_unordered_default (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/detail/store_unordered_default 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -42,7 +42,7 @@
static typename remove_cv< TargetType >::type execute( TargetType& target )
{
// ToDo: Look ahead for store_release_support and produce error here
- return interlocked::store_release( target );
+ return interlocked::store< release >( target );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -28,7 +28,7 @@
::type
store( TargetType& destination, SourceType const& new_value )
{
- store_release( destination, new_value );
+ store< release >( destination, new_value );
}
} } }
Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_fully_ordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_fully_ordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
+++ (empty file)
@@ -1,77 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to 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_ACT_INTERLOCKED_STORE_STORE_ACQ_REL_HPP
-#define BOOST_ACT_INTERLOCKED_STORE_STORE_ACQ_REL_HPP
-
-#include <boost/act/config/interlocked/has.hpp>
-
-#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( store, acq_rel )
-
-#include <boost/utility/enable_if.hpp>
-
-#include <boost/act/interlocked/detail/cas_support.hpp>
-#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-
-#include <boost/act/interlocked/detail/impl_meta.hpp>
-
-#include <boost/act/interlocked/detail/impl.hpp>
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_INFO \
-( store, acq_rel )
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_IMPL_BEGIN()
-
-namespace boost { namespace act { namespace interlocked {
-
-template< typename TargetType, typename SourceType >
-typename enable_if
-<
- mpl::and_
- <
- detail::are_valid_store_style_params< TargetType, SourceType const >
- , mpl::not_< detail::is_interlocked_bool< TargetType > >
- >
->
-::type
-store_acq_rel( TargetType& destination, SourceType const& new_value )
-{
- detail::impl_meta< detail::store_acq_rel, TargetType >
- ::execute( destination, new_value );
-
-}
-
-template< typename TargetType, typename SourceType >
-typename enable_if
-<
- mpl::and_
- <
- detail::are_valid_store_style_params< TargetType, SourceType const >
- , detail::is_interlocked_bool< TargetType >
- >
->
-::type
-store_acq_rel( TargetType& destination, SourceType const& new_value )
-{
- interlocked::store_acq_rel
- ( interlocked_bool_internal_value( destination )
- , static_cast< bool >( new_value )
- );
-}
-
-} } }
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_IMPL_END()
-
-#endif
-
-#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( store, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -33,36 +35,38 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
>
::type
-store_release( TargetType& destination, SourceType const& new_value )
+store( TargetType& destination, SourceType const& new_value )
{
detail::impl_meta< detail::store_release_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
>
::type
-store_release( TargetType& destination, SourceType const& new_value )
+store( TargetType& destination, SourceType const& new_value )
{
- interlocked::store_release
+ interlocked::store< release >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
);
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_release_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( store, release )
+#include <boost/act/interlocked/semantics/release.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,29 +26,31 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
>
::type
-store_release( TargetType& destination, SourceType const& new_value );
+store( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, release >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
>
::type
-store_release( TargetType& destination, SourceType const& new_value );
+store( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( store, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -33,36 +35,38 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
>
::type
-store_unordered( TargetType& destination, SourceType const& new_value )
+store( TargetType& destination, SourceType const& new_value )
{
detail::impl_meta< detail::store_unordered_impl, TargetType >
::execute( destination, new_value );
}
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
>
::type
-store_unordered( TargetType& destination, SourceType const& new_value )
+store( TargetType& destination, SourceType const& new_value )
{
- interlocked::store_unordered
+ interlocked::store< unordered >
( interlocked_bool_internal_value( destination )
, static_cast< bool >( new_value )
);
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/store/store_unordered_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,7 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( store, unordered )
+#include <boost/act/interlocked/semantics/unordered.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
#include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
@@ -24,29 +26,31 @@
namespace boost { namespace act { namespace interlocked {
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, mpl::not_< detail::is_interlocked_bool< TargetType > >
>
>
::type
-store_unordered( TargetType& destination, SourceType const& new_value );
+store( TargetType& destination, SourceType const& new_value );
-template< typename TargetType, typename SourceType >
+template< typename Semantics, typename TargetType, typename SourceType >
typename enable_if
<
mpl::and_
<
- detail::are_valid_store_style_params< TargetType, SourceType const >
+ is_same< Semantics, unordered >
+ , detail::are_valid_store_style_params< TargetType, SourceType const >
, detail::is_interlocked_bool< TargetType >
>
>
::type
-store_unordered( TargetType& destination, SourceType const& new_value );
+store( TargetType& destination, SourceType const& new_value );
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( subtract_assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/act/interlocked/subtract_assign/subtract_assign_acq_rel.hpp>
@@ -30,8 +33,21 @@
::type
subtract_assign( TargetType& destination, SourceType const& new_value )
{
- return interlocked::subtract_assign_acq_rel( destination, new_value );
+ return interlocked::subtract_assign< acq_rel >( destination, new_value );
+}
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_< is_same< Semantics, default_ >
+ , detail::are_valid_additive_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+subtract_assign( TargetType& destination, SourceType const& new_value )
+{
+ return interlocked::subtract_assign< acq_rel >( destination, new_value );
}
} } }
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_fwd.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -13,6 +13,9 @@
#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( subtract_assign, acq_rel )
+#include <boost/act/interlocked/semantics/default.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/act/interlocked/detail/cas_support.hpp>
@@ -30,6 +33,17 @@
::type
subtract_assign( TargetType& destination, SourceType const& new_value );
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+ mpl::and_< is_same< Semantics, default_ >
+ , detail::are_valid_additive_params< TargetType, SourceType const >
+ >
+, remove_cv< TargetType >
+>
+::type
+subtract_assign( TargetType& destination, SourceType const& new_value );
+
} } }
#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/type_traits/is_semantics.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/type_traits/is_semantics.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -0,0 +1,27 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to 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_ACT_INTERLOCKED_TYPE_TRAITS_IS_SEMANTICS_HPP
+#define BOOST_ACT_INTERLOCKED_TYPE_TRAITS_IS_SEMANTICS_HPP
+
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/act/interlocked/semantics_fwd.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename Type >
+struct is_semantics
+ : mpl::or_< is_same< Type, acquire >, is_same< Type, release >
+ , is_same< Type, acq_rel >, is_same< Type, unordered >
+ , is_same< Type, default_ >
+ > {};
+
+} } }
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME add_assign
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS default_
#include "add_assign_helper.hpp"
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_acquire.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_acquire.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_acquire.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME add_assign_acquire
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS acquire
#include "add_assign_helper.hpp"
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_helper.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_helper.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_helper.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -16,15 +16,16 @@
#include <boost/type_traits/remove_cv.hpp>
#include <boost/preprocessor/cat.hpp>
-struct BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
+struct BOOST_PP_CAT( interlocked_add_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
)
{
template< typename LeftType, typename RightType >
typename boost::remove_cv< LeftType >::type
operator ()( LeftType& left, RightType const& right ) const
{
- return boost::act::interlocked::BOOST_ACT_TEST_INTERLOCKED_NAME
+ return boost::act::interlocked::add_assign
+ < boost::act::interlocked::BOOST_ACT_TEST_INTERLOCKED_SEMANTICS >
( left, right );
}
};
@@ -32,15 +33,15 @@
int test_main( int, char *[] )
{
brute_operation_result_checker( basic_add()
- , BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
+ , BOOST_PP_CAT( interlocked_add_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
)
()
);
brute_additive_assign_test( basic_add_assign()
- , BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
+ , BOOST_PP_CAT( interlocked_add_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
)
()
);
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_release.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_release.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/add_assign/add_assign_release.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME add_assign_release
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS release
#include "add_assign_helper.hpp"
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_release.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_release.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_release.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -19,7 +19,8 @@
typename boost::remove_cv< VariableType >::type
operator ()( VariableType& var, SourceType new_val ) const
{
- return boost::act::interlocked::assign_release( var, new_val );
+ return boost::act::interlocked::assign< boost::act::interlocked::release >
+ ( var, new_val );
}
};
@@ -27,20 +28,20 @@
{
test_store_load_no_threads( single_thread_basic_get()
- , interlocked_assign_release_set()
- );
+ , interlocked_assign_release_set()
+ );
test_store_load_no_threads( interlocked_load_get()
- , interlocked_assign_release_set()
- );
+ , interlocked_assign_release_set()
+ );
{
boost::barrier barrier( 2 );
test_store_load_with_threads( barrier
- , interlocked_load_get()
- , interlocked_assign_release_set()
- );
+ , interlocked_load_get()
+ , interlocked_assign_release_set()
+ );
}
brute_assign_test( interlocked_assign_release_set() );
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_unordered.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_unordered.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/assign/assign_unordered.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -19,27 +19,28 @@
typename boost::remove_cv< VariableType >::type
operator ()( VariableType& var, SourceType new_val ) const
{
- return boost::act::interlocked::assign_unordered( var, new_val );
+ return boost::act::interlocked::assign< boost::act::interlocked::unordered >
+ ( var, new_val );
}
};
int test_main( int, char *[] )
{
test_store_load_no_threads( single_thread_basic_get()
- , interlocked_assign_unordered_set()
- );
+ , interlocked_assign_unordered_set()
+ );
test_store_load_no_threads( interlocked_load_get()
- , interlocked_assign_unordered_set()
- );
+ , interlocked_assign_unordered_set()
+ );
{
boost::barrier barrier( 2 );
test_store_load_with_threads( barrier
- , interlocked_load_get()
- , interlocked_assign_unordered_set()
- );
+ , interlocked_load_get()
+ , interlocked_assign_unordered_set()
+ );
}
brute_assign_test( interlocked_assign_unordered_set() );
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/store_load_helper.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/store_load_helper.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/store_load_helper.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -82,7 +82,7 @@
typename boost::remove_cv< VariableType >::type
operator ()( VariableType& var ) const
{
- return boost::act::interlocked::load_unordered( var );
+ return boost::act::interlocked::load( var );
}
};
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME subtract_assign
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS default_
#include "subtract_assign_helper.hpp"
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_acquire.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_acquire.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_acquire.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME subtract_assign_acquire
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS acquire
#include "subtract_assign_helper.hpp"
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_helper.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_helper.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_helper.hpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -15,15 +15,16 @@
#include <boost/type_traits/remove_cv.hpp>
#include <boost/preprocessor/cat.hpp>
-struct BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
+struct BOOST_PP_CAT( interlocked_subtract_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
)
{
template< typename LeftType, typename RightType >
typename boost::remove_cv< LeftType >::type
operator ()( LeftType& left, RightType const& right ) const
{
- return boost::act::interlocked::BOOST_ACT_TEST_INTERLOCKED_NAME
+ return boost::act::interlocked::subtract_assign
+ < boost::act::interlocked::BOOST_ACT_TEST_INTERLOCKED_SEMANTICS >
( left, right );
}
};
@@ -31,15 +32,16 @@
int test_main( int, char *[] )
{
brute_operation_result_checker( basic_subtract()
- , BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
- )
- ()
+ , BOOST_PP_CAT
+ ( interlocked_subtract_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
+ )
+ ()
);
brute_additive_assign_test( basic_subtract_assign()
- , BOOST_PP_CAT( interlocked_
- , BOOST_ACT_TEST_INTERLOCKED_NAME
+ , BOOST_PP_CAT( interlocked_subtract_assign_
+ , BOOST_ACT_TEST_INTERLOCKED_SEMANTICS
)
()
);
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_release.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_release.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/interlocked/subtract_assign/subtract_assign_release.cpp 2007-06-28 14:13:15 EDT (Thu, 28 Jun 2007)
@@ -6,6 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#define BOOST_ACT_TEST_INTERLOCKED_NAME subtract_assign_release
+#define BOOST_ACT_TEST_INTERLOCKED_SEMANTICS release
#include "subtract_assign_helper.hpp"
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