Boost logo

Boost-Commit :

From: matt_calabrese_at_[hidden]
Date: 2007-06-21 20:43:59


Author: matt_calabrese
Date: 2007-06-21 20:43:58 EDT (Thu, 21 Jun 2007)
New Revision: 7124
URL: http://svn.boost.org/trac/boost/changeset/7124

Log:

Text files modified:
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_gcc_x86 | 11 ++++-------
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows | 28 ++++++++++++++--------------
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_gcc_x86 | 20 ++++++++------------
   3 files changed, 26 insertions(+), 33 deletions(-)

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_gcc_x86
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_gcc_x86 (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_gcc_x86 2007-06-21 20:43:58 EDT (Thu, 21 Jun 2007)
@@ -15,19 +15,16 @@
 
 struct assign_impl
 {
- template< typename LeftType, typename RightType >
- static typename remove_cv< LeftType >::type
- execute( LeftType& left, RightType right )
+ template< typename Type >
+ static typename remove_cv< Type >::type
+ execute( Type& left, typename remove_cv< Type >::type right )
   {
- // __volatile__ guarantees no compiler reordering
- // Note: lock is implied with xchg
     __asm__ __volatile__
     (
- "sfence\n\t"
       "xchg %0, (%1)":
       "+r"( right ):
       "r"( &left ):
- "memory", "cc" // clobbers
+ "memory", "cc"
     );
 
     return right;

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows 2007-06-21 20:43:58 EDT (Thu, 21 Jun 2007)
@@ -27,17 +27,17 @@
 
 struct assign_impl
 {
- template< typename LeftType, typename RightType >
+ template< typename Type >
   static
   typename lazy_enable_if_c
   <
- ( sizeof( LeftType ) == 4 )
- , remove_cv< LeftType >
+ ( sizeof( Type ) == 4 )
+ , remove_cv< Type >
>
   ::type
- execute( LeftType& left, RightType right )
+ execute( Type& left, typename remove_cv< Type >::type right )
   {
- typedef typename remove_cv< LeftType >::type unqualified_type;
+ typedef typename remove_cv< Type >::type unqualified_type;
 
     return static_cast< unqualified_type >
            (
@@ -48,11 +48,11 @@
            );
   }
 
- template< typename LeftType, typename RightType >
- static typename remove_cv< LeftType* >::type
- execute( LeftType*& left, RightType right )
+ template< typename Type >
+ static typename remove_cv< Type* >::type
+ execute( Type*& left, typename remove_cv< Type >::type right )
   {
- typedef typename remove_cv< LeftType* >::type unqualified_type;
+ typedef typename remove_cv< Type* >::type unqualified_type;
 
     return static_cast< unqualified_type >
            (
@@ -69,17 +69,17 @@
 
 #if WINVER >= 0x0600
 
- template< typename LeftType, typename RightType >
+ template< typename Type >
   static
   typename lazy_enable_if_c
   <
- ( sizeof( LeftType ) == 8 )
- , remove_cv< LeftType >
+ ( sizeof( Type ) == 8 )
+ , remove_cv< Type >
>
   ::type
- execute( LeftType& left, RightType right )
+ execute( Type& left, typename remove_cv< Type >::type right )
   {
- typedef typename remove_cv< LeftType >::type unqualified_type;
+ typedef typename remove_cv< Type >::type unqualified_type;
 
     return static_cast< unqualified_type >
            (

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_gcc_x86
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_gcc_x86 (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_gcc_x86 2007-06-21 20:43:58 EDT (Thu, 21 Jun 2007)
@@ -9,28 +9,24 @@
 #ifndef BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_ASSIGN_IF_WAS_GCC_X86_HPP
 #define BOOST_ACT_INTERLOCKED_ASSIGN_IF_WAS_DETAIL_ASSIGN_IF_WAS_GCC_X86_HPP
 
-#include <boost/config.hpp>
-
-#include <boost/detail/interlocked.hpp>
-
 #include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
 struct assign_if_was_impl
 {
- template< typename LeftType, typename RightType, typename OldType >
- static typename remove_cv< LeftType >::type
- execute( LeftType& left, RightType right, OldType old )
+ template< typename Type >
+ static typename remove_cv< Type >::type
+ execute( Type& left
+ , typename remove_cv< Type >::type right
+ , typename remove_cv< Type >::type old
+ )
   {
- // ToDo: Very important!!!! This currently is just release semantics!
- // Rewrite to have both acquire and release semantics!!!
+ // ToDo: Verify semantics
     __asm__ __volatile__
     (
- "sfence\n\t"
         "lock\n\t"
- "cmpxchgl %1, %2\n\t"
- /*"lfence\n\t"*/:
+ "cmpxchgl %1, %2":
         "=a" (old):
         "q" (right), "m" (left), "0" (old):
         "memory", "cc"


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