$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: matt_calabrese_at_[hidden]
Date: 2007-06-29 02:44:59
Author: matt_calabrese
Date: 2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
New Revision: 7311
URL: http://svn.boost.org/trac/boost/changeset/7311
Log:
Updated increment and decrement to use the new semantic forms via template arguments.
Added:
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acq_rel_default
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_unordered_default
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acq_rel_default
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_unordered_default
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered_fwd.hpp
Properties modified: 
   sandbox/SOC/2006/concurrency/trunk/libs/act/   (props changed)
Text files modified: 
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign.hpp                            |     1                                         
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement.hpp                                        |     2 +                                       
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement.hpp                              |    45 +++++++++++++++++++++++++++++++++++++-- 
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_fwd.hpp                          |    39 ++++++++++++++++++++++++++++++++--      
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default           |     2                                         
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement_fwd.hpp                                    |     2 +                                       
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp              |     9 +++++--                                 
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_fwd_dont_include.hpp          |     7 ++++-                                   
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment.hpp                                        |     2 +                                       
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment.hpp                              |    45 +++++++++++++++++++++++++++++++++++++-- 
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acquire.hpp                      |     5 +--                                     
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_fwd.hpp                          |    39 ++++++++++++++++++++++++++++++++--      
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment_fwd.hpp                                    |     2 +                                       
   sandbox/SOC/2006/concurrency/trunk/boost/act/queue_policy/bounded_queue_policy/safe_single_push_pop_queue.hpp |     4 +-                                      
   sandbox/SOC/2006/concurrency/trunk/libs/act/test/consumer_policy_tester.hpp                                   |     3 +                                       
   15 files changed, 182 insertions(+), 25 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-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -36,7 +36,6 @@
   return interlocked::add_assign< acq_rel >( destination, new_value );
 }
 
-
 template< typename Semantics, typename TargetType, typename SourceType >
 typename lazy_enable_if
 <
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -12,5 +12,7 @@
 #include <boost/act/interlocked/decrement/decrement.hpp>
 #include <boost/act/interlocked/decrement/decrement_acquire.hpp>
 #include <boost/act/interlocked/decrement/decrement_release.hpp>
+#include <boost/act/interlocked/decrement/decrement_acq_rel.hpp>
+#include <boost/act/interlocked/decrement/decrement_unordered.hpp>
 
 #endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -9,10 +9,49 @@
 #ifndef BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_HPP
 #define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_HPP
 
-#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+#include <boost/act/config/interlocked/has.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO ( decrement, acq_rel )
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( add_assign, acq_rel )
 
-#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+#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/decrement/decrement_acq_rel.hpp>
+
+#include <boost/act/interlocked/detail/cas_support.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+  detail::are_valid_store_style_params< TargetType >
+, remove_cv< TargetType >
+>
+::type
+decrement( TargetType& destination )
+{
+  return interlocked::decrement< acq_rel >( destination );
+}
+
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+  mpl::and_< is_same< Semantics, default_ >
+           , detail::are_valid_store_style_params< TargetType >
+           >
+, remove_cv< TargetType >
+>
+::type
+decrement( TargetType& destination )
+{
+  return interlocked::decrement< acq_rel >( destination );
+}
+
+} } }
+
+#endif
 
 #endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+    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_DECREMENT_DECREMENT_ACQ_REL_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_ACQ_REL_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO                      \
+( decrement, acq_rel )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_acq_rel_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+    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_DECREMENT_DECREMENT_ACQ_REL_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_ACQ_REL_FWD_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO                  \
+( decrement, acq_rel )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_fwd.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -9,10 +9,43 @@
 #ifndef BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_FWD_HPP
 #define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_FWD_HPP
 
-#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+#include <boost/act/config/interlocked/has.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO ( decrement, acq_rel )
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( decrement, acq_rel )
 
-#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+#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>
+
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType >
+typename lazy_enable_if
+<
+  detail::are_valid_store_style_params< TargetType >
+, remove_cv< TargetType >
+>
+::type
+decrement( TargetType& destination );
+
+template< typename Semantics, typename TargetType >
+typename lazy_enable_if
+<
+  mpl::and_< is_same< Semantics, default_ >
+           , detail::are_valid_store_style_params< TargetType >
+           >
+, remove_cv< TargetType >
+>
+::type
+decrement( TargetType& destination );
+
+} } }
+
+#endif
 
 #endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+    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_DECREMENT_DECREMENT_UNORDERED_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_UNORDERED_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO                      \
+( decrement, unordered )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/decrement_unordered_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+    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_DECREMENT_DECREMENT_UNORDERED_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DECREMENT_UNORDERED_FWD_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO                  \
+( decrement, unordered )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acq_rel_default
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acq_rel_default	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,46 @@
+/*=============================================================================
+    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_DECREMENT_DETAIL_DECREMENT_ACQ_REL_DEF_IMPL_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DETAIL_DECREMENT_ACQ_REL_DEF_IMPL_HPP
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp>
+#include <boost/act/interlocked/load.hpp>
+#include <boost/act/detail/prior.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct decrement_acq_rel_default_impl
+{
+  template< typename TargetType >
+  static typename remove_cv< TargetType >::type execute( TargetType& target )
+  {
+    typedef typename remove_cv< TargetType >::type unqualified_type;
+
+    unqualified_type new_value;
+
+    for( unqualified_type curr_value = load( target )
+       ;    ( new_value = assign_if_was< acq_rel >
+                          ( target
+                          , act::detail::prior( curr_value )
+                          , curr_value
+                          )
+            )
+         != curr_value
+       ; curr_value = new_value
+       );
+
+    // Note: new_value is old value here
+    return new_value;
+  }
+};
+
+} } } }
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -26,7 +26,7 @@
     unqualified_type new_value;
 
     for( unqualified_type curr_value = load( target )
-       ;    ( new_value = assign_if_was_acquire
+       ;    ( new_value = assign_if_was< acquire >
                           ( target
                           , act::detail::prior( curr_value )
                           , curr_value
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_unordered_default
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_unordered_default	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,46 @@
+/*=============================================================================
+    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_DECREMENT_DETAIL_DECREMENT_UN_DEF_IMPL_HPP
+#define BOOST_ACT_INTERLOCKED_DECREMENT_DETAIL_DECREMENT_UN_DEF_IMPL_HPP
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp>
+#include <boost/act/interlocked/load.hpp>
+#include <boost/act/detail/prior.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct decrement_unordered_default_impl
+{
+  template< typename TargetType >
+  static typename remove_cv< TargetType >::type execute( TargetType& target )
+  {
+    typedef typename remove_cv< TargetType >::type unqualified_type;
+
+    unqualified_type new_value;
+
+    for( unqualified_type curr_value = load( target )
+       ;    ( new_value = assign_if_was< unordered >
+                          ( target
+                          , act::detail::prior( curr_value )
+                          , curr_value
+                          )
+            )
+         != curr_value
+       ; curr_value = new_value
+       );
+
+    // Note: new_value is old value here
+    return new_value;
+  }
+};
+
+} } } }
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement_fwd.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -12,5 +12,7 @@
 #include <boost/act/interlocked/decrement/decrement_fwd.hpp>
 #include <boost/act/interlocked/decrement/decrement_acquire_fwd.hpp>
 #include <boost/act/interlocked/decrement/decrement_release_fwd.hpp>
+#include <boost/act/interlocked/decrement/decrement_acq_rel_fwd.hpp>
+#include <boost/act/interlocked/decrement/decrement_unordered_fwd.hpp>
 
 #endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -22,6 +22,8 @@
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/act/interlocked/semantics.hpp>
 
 #include <boost/type_traits/remove_volatile.hpp>
 
@@ -36,18 +38,19 @@
 
 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, BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_SEMANTICS >
+  , detail::are_valid_store_style_params< TargetType >
   , mpl::not_< detail::is_interlocked_bool< TargetType > >
   >
 , remove_cv< TargetType >
 >
 ::type
-BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME( TargetType& target )
+BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_SHORT_NAME( TargetType& target )
 {
   return detail::impl_meta
          <
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_fwd_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_fwd_dont_include.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_fwd_dont_include.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -17,6 +17,8 @@
 
 #include <boost/act/interlocked/detail/cas_support.hpp>
 #include <boost/act/interlocked/integer/detail/interlocked_bool.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/act/interlocked/semantics.hpp>
 
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/not.hpp>
@@ -35,13 +37,14 @@
 <
   mpl::and_
   <
-    detail::are_valid_store_style_params< TargetType >
+    is_same< Semantics, BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_SEMANTICS >
+  , detail::are_valid_store_style_params< TargetType >
   , mpl::not_< detail::is_interlocked_bool< TargetType > >
   >
 , remove_cv< TargetType >
 >
 ::type
-BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_FULL_NAME( TargetType& target );
+BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_SHORT_NAME( TargetType& target );
 
 } } }
 
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -12,5 +12,7 @@
 #include <boost/act/interlocked/increment/increment.hpp>
 #include <boost/act/interlocked/increment/increment_acquire.hpp>
 #include <boost/act/interlocked/increment/increment_release.hpp>
+#include <boost/act/interlocked/increment/increment_acq_rel.hpp>
+#include <boost/act/interlocked/increment/increment_unordered.hpp>
 
 #endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acq_rel_default
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acq_rel_default	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,46 @@
+/*=============================================================================
+    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_INCREMENT_DETAIL_INCREMENT_ACQ_REL_DEF_IMPL_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_DETAIL_INCREMENT_ACQ_REL_DEF_IMPL_HPP
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_acq_rel.hpp>
+#include <boost/act/interlocked/load.hpp>
+#include <boost/act/detail/next.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct increment_acq_rel_default_impl
+{
+  template< typename TargetType >
+  static typename remove_cv< TargetType >::type execute( TargetType& target )
+  {
+    typedef typename remove_cv< TargetType >::type unqualified_type;
+
+    unqualified_type new_value;
+
+    for( unqualified_type curr_value = load( target )
+       ;    ( new_value = assign_if_was< acq_rel >
+                          ( target
+                          , act::detail::next( curr_value )
+                          , curr_value
+                          )
+            )
+         != curr_value
+       ; curr_value = new_value
+       );
+
+    // Note: new_value is old value here
+    return new_value;
+  }
+};
+
+} } } }
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_unordered_default
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_unordered_default	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -0,0 +1,46 @@
+/*=============================================================================
+    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_INCREMENT_DETAIL_INCREMENT_UN_DEF_IMPL_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_DETAIL_INCREMENT_UN_DEF_IMPL_HPP
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_unordered.hpp>
+#include <boost/act/interlocked/load.hpp>
+#include <boost/act/detail/next.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct increment_unordered_default_impl
+{
+  template< typename TargetType >
+  static typename remove_cv< TargetType >::type execute( TargetType& target )
+  {
+    typedef typename remove_cv< TargetType >::type unqualified_type;
+
+    unqualified_type new_value;
+
+    for( unqualified_type curr_value = load( target )
+       ;    ( new_value = assign_if_was< unordered >
+                          ( target
+                          , act::detail::next( curr_value )
+                          , curr_value
+                          )
+            )
+         != curr_value
+       ; curr_value = new_value
+       );
+
+    // Note: new_value is old value here
+    return new_value;
+  }
+};
+
+} } } }
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -9,10 +9,49 @@
 #ifndef BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_HPP
 #define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_HPP
 
-#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+#include <boost/act/config/interlocked/has.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO ( increment, acq_rel )
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( add_assign, acq_rel )
 
-#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+#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/increment/increment_acq_rel.hpp>
+
+#include <boost/act/interlocked/detail/cas_support.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+  detail::are_valid_store_style_params< TargetType >
+, remove_cv< TargetType >
+>
+::type
+increment( TargetType& destination )
+{
+  return interlocked::increment< acq_rel >( destination );
+}
+
+template< typename Semantics, typename TargetType, typename SourceType >
+typename lazy_enable_if
+<
+  mpl::and_< is_same< Semantics, default_ >
+           , detail::are_valid_store_style_params< TargetType >
+           >
+, remove_cv< TargetType >
+>
+::type
+increment( TargetType& destination )
+{
+  return interlocked::increment< acq_rel >( destination );
+}
+
+} } }
+
+#endif
 
 #endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel.hpp	2007-06-29 02:44:56 EDT (Fri, 29 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_INCREMENT_INCREMENT_ACQ_REL_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQ_REL_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO ( increment, acq_rel )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acq_rel_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 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_INCREMENT_INCREMENT_ACQUIRE_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQUIRE_FWD_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO ( increment, acquire )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acquire.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_acquire.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -6,8 +6,8 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQUIRE_HPP
-#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQUIRE_HPP
+#ifndef BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQ_REL_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_ACQ_REL_HPP
 
 #include <boost/act/interlocked/detail/unary_forwarder.hpp>
 
@@ -15,5 +15,4 @@
 
 #include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
 
-
 #endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_fwd.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -9,10 +9,43 @@
 #ifndef BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_FWD_HPP
 #define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_FWD_HPP
 
-#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+#include <boost/act/config/interlocked/has.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO ( increment, acq_rel )
+#if BOOST_ACT_CONFIG_INTERLOCKED_HAS( increment, acq_rel )
 
-#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+#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>
+
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType >
+typename lazy_enable_if
+<
+  detail::are_valid_store_style_params< TargetType >
+, remove_cv< TargetType >
+>
+::type
+increment( TargetType& destination );
+
+template< typename Semantics, typename TargetType >
+typename lazy_enable_if
+<
+  mpl::and_< is_same< Semantics, default_ >
+           , detail::are_valid_store_style_params< TargetType >
+           >
+, remove_cv< TargetType >
+>
+::type
+increment( TargetType& destination );
+
+} } }
+
+#endif
 
 #endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered.hpp	2007-06-29 02:44:56 EDT (Fri, 29 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_INCREMENT_INCREMENT_UNORDERED_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_UNORDERED_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_INFO ( increment, unordered )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER()
+
+#endif
Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/increment_unordered_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 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_INCREMENT_INCREMENT_UNORDERED_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_INCREMENT_INCREMENT_UNORDERED_FWD_HPP
+
+#include <boost/act/interlocked/detail/unary_forwarder.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD_INFO ( increment, unordered )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_UNARY_FORWARDER_FWD()
+
+#endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment_fwd.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment_fwd.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -12,5 +12,7 @@
 #include <boost/act/interlocked/increment/increment_fwd.hpp>
 #include <boost/act/interlocked/increment/increment_acquire_fwd.hpp>
 #include <boost/act/interlocked/increment/increment_release_fwd.hpp>
+#include <boost/act/interlocked/increment/increment_acq_rel_fwd.hpp>
+#include <boost/act/interlocked/increment/increment_unordered_fwd.hpp>
 
 #endif
Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/queue_policy/bounded_queue_policy/safe_single_push_pop_queue.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/queue_policy/bounded_queue_policy/safe_single_push_pop_queue.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/queue_policy/bounded_queue_policy/safe_single_push_pop_queue.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -128,7 +128,7 @@
     factory.template apply< value_type >( end_m - 1 );
 
     // Thread-safe incrememnt with release memory semantics.
-    interlocked::increment_release( curr_size_m );
+    interlocked::increment< interlocked::release >( curr_size_m );
   }
 
   void pop()
@@ -142,7 +142,7 @@
     begin_m = next( begin_m );
 
     // Thread-safe decrement with release memory semantics.
-    interlocked::decrement_release( curr_size_m );
+    interlocked::decrement< interlocked::release >( curr_size_m );
   }
 
   optional< value_type > value_pop()
Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/consumer_policy_tester.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/consumer_policy_tester.hpp	(original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/consumer_policy_tester.hpp	2007-06-29 02:44:56 EDT (Fri, 29 Jun 2007)
@@ -66,7 +66,8 @@
 
     boost::thread::sleep( time_of_completion );
 
-    boost::act::interlocked::increment_acquire( target_m );
+    boost::act::interlocked::increment
+    < boost::act::interlocked::acquire >( target_m );
   }
 
   int operator ()( int value ) const