$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r51807 - in sandbox/threadpool: boost/tp boost/tp/detail libs/tp/src
From: oliver.kowalke_at_[hidden]
Date: 2009-03-16 17:10:07
Author: olli
Date: 2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
New Revision: 51807
URL: http://svn.boost.org/trac/boost/changeset/51807
Log:
* some corrections related to msvc-9.0
Text files modified: 
   sandbox/threadpool/boost/tp/bounded_channel.hpp   |     4 ++--                                    
   sandbox/threadpool/boost/tp/detail/atomic.hpp     |    11 ++++++-----                             
   sandbox/threadpool/boost/tp/lockfree_channel.hpp  |     4 ++--                                    
   sandbox/threadpool/boost/tp/pool.hpp              |     2 +-                                      
   sandbox/threadpool/boost/tp/unbounded_channel.hpp |     4 ++--                                    
   sandbox/threadpool/libs/tp/src/default_pool.cpp   |     2 +-                                      
   6 files changed, 14 insertions(+), 13 deletions(-)
Modified: sandbox/threadpool/boost/tp/bounded_channel.hpp
==============================================================================
--- sandbox/threadpool/boost/tp/bounded_channel.hpp	(original)
+++ sandbox/threadpool/boost/tp/bounded_channel.hpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -181,7 +181,7 @@
                                         & bounded_channel::consumers_activate_,
                                         this) );
                 }
-		catch ( thread_interrupted const& e)
+		catch ( thread_interrupted const&)
                 { return false; }
                 if ( deactive_now_() || ( deactive_() && empty_() ) )
                         return false;
@@ -219,7 +219,7 @@
                                         this) ) )
                                 return false;
                 }
-		catch ( thread_interrupted const& e)
+		catch ( thread_interrupted const&)
                 { return false; }
                 if ( deactive_now_() || ( deactive_() && empty_() ) )
                         return false;
Modified: sandbox/threadpool/boost/tp/detail/atomic.hpp
==============================================================================
--- sandbox/threadpool/boost/tp/detail/atomic.hpp	(original)
+++ sandbox/threadpool/boost/tp/detail/atomic.hpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -16,22 +16,23 @@
 
 template< typename T >
 bool atomic_compare_exchange_ptr( volatile T * object, T expected, T desired)
-{ return InterlockedCompareExchangePointer( object, expected, desired); }
+{ return InterlockedCompareExchangePointer( ( PVOID *) object, ( PVOID) expected, ( PVOID) desired); }
 
+inline
 void atomic_write_32( volatile unsigned int * object, unsigned int desired)
-{ InterlockedExchange( object, desired); }
+{ InterlockedExchange( ( volatile LONG *) object, desired); }
 
 template< typename T >
 void atomic_write_ptr( volatile T * object, T desired)
-{ InterlockedExchangePointer( object, desired); }
+{ InterlockedExchangePointer( ( volatile LONG *) object, desired); }
 
 inline
 unsigned int atomic_inc_32( volatile unsigned int * object)
-{ return InterlockedIncrement( object); }
+{ return InterlockedIncrement( ( volatile LONG *) object); }
 
 inline
 unsigned int atomic_dec_32( volatile unsigned int * object)
-{ return InterlockedDecrement( object); }
+{ return InterlockedDecrement( ( volatile LONG *) object); }
 
 #elif defined(__hpux)
 
Modified: sandbox/threadpool/boost/tp/lockfree_channel.hpp
==============================================================================
--- sandbox/threadpool/boost/tp/lockfree_channel.hpp	(original)
+++ sandbox/threadpool/boost/tp/lockfree_channel.hpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -141,12 +141,12 @@
 
         void put( item const& itm)
         {
-		if ( ! active_() )
+		if ( ! active() )
                         throw task_rejected("channel is not active");
 
                 pointer_t tail;
                 node_t * node( new node_t( itm) );
-		for ( active() )
+		while ( active() )
                 {
                         tail = pointer_t( tail_);
                         node->next = pointer_t( tail.ptr, tail.tag + 1);
Modified: sandbox/threadpool/boost/tp/pool.hpp
==============================================================================
--- sandbox/threadpool/boost/tp/pool.hpp	(original)
+++ sandbox/threadpool/boost/tp/pool.hpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -317,7 +317,7 @@
         { return state_ > 0; }
 
         unsigned int close_()
-	{ return detail::atomic_fetch_add( & state_, 1); }
+	{ return detail::atomic_inc_32( & state_); }
 
 public:
         explicit pool(
Modified: sandbox/threadpool/boost/tp/unbounded_channel.hpp
==============================================================================
--- sandbox/threadpool/boost/tp/unbounded_channel.hpp	(original)
+++ sandbox/threadpool/boost/tp/unbounded_channel.hpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -133,7 +133,7 @@
                                         & unbounded_channel::consumers_activate_,
                                         this) );
                 }
-		catch ( thread_interrupted const& e)
+		catch ( thread_interrupted const&)
                 { return false; }
                 if ( deactive_now_() || ( deactive_() && empty_() ) )
                         return false;
@@ -162,7 +162,7 @@
                                         this) ) )
                                 return false;
                 }
-		catch ( thread_interrupted const& e)
+		catch ( thread_interrupted const&)
                 { return false; }
                 if ( deactive_now_() || ( deactive_() && empty_() ) )
                         return false;
Modified: sandbox/threadpool/libs/tp/src/default_pool.cpp
==============================================================================
--- sandbox/threadpool/libs/tp/src/default_pool.cpp	(original)
+++ sandbox/threadpool/libs/tp/src/default_pool.cpp	2009-03-16 17:10:06 EDT (Mon, 16 Mar 2009)
@@ -5,6 +5,6 @@
 namespace detail
 {
 default_pool
-static_pool::instance( poolsize( thread::hardware_concurrency() ) );
+static_pool::instance = default_pool( poolsize( thread::hardware_concurrency() ) );
 }
 } }
\ No newline at end of file