Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53458 - in sandbox/task: boost/task libs/task/src
From: oliver.kowalke_at_[hidden]
Date: 2009-05-30 10:50:32


Author: olli
Date: 2009-05-30 10:50:31 EDT (Sat, 30 May 2009)
New Revision: 53458
URL: http://svn.boost.org/trac/boost/changeset/53458

Log:
fixes for Windows
Text files modified:
   sandbox/task/boost/task/utility.hpp | 18 +++++++++++-------
   sandbox/task/libs/task/src/default_pool.cpp | 2 +-
   sandbox/task/libs/task/src/semaphore_windows.cpp | 4 ++--
   3 files changed, 14 insertions(+), 10 deletions(-)

Modified: sandbox/task/boost/task/utility.hpp
==============================================================================
--- sandbox/task/boost/task/utility.hpp (original)
+++ sandbox/task/boost/task/utility.hpp 2009-05-30 10:50:31 EDT (Sat, 30 May 2009)
@@ -13,11 +13,13 @@
 
 #include <boost/task/detail/worker.hpp>
 
+#include <boost/config/abi_prefix.hpp>
+
 namespace boost { namespace this_task
 {
 namespace detail
 {
-struct time_reached
+struct BOOST_TASK_DECL time_reached
 {
         system_time abs_time;
 
@@ -29,7 +31,7 @@
         { return get_system_time() >= abs_time; }
 };
 
-class once_false
+class BOOST_TASK_DECL once_false
 {
 private:
         bool result_;
@@ -69,11 +71,11 @@
 }
 
 inline
-bool runs_in_pool()
+BOOST_TASK_DECL bool runs_in_pool()
 { return task::detail::worker::tss_get() != 0; }
 
 inline
-thread::id worker_id()
+BOOST_TASK_DECL thread::id worker_id()
 {
         task::detail::worker * w( task::detail::worker::tss_get() );
         BOOST_ASSERT( w);
@@ -81,7 +83,7 @@
 }
 
 inline
-void delay( system_time abs_time)
+BOOST_TASK_DECL void delay( system_time abs_time)
 {
         if ( runs_in_pool() )
         {
@@ -97,7 +99,7 @@
 { delay( get_system_time() + rel_time); }
 
 inline
-void yield()
+BOOST_TASK_DECL void yield()
 {
         if ( runs_in_pool() )
         {
@@ -109,7 +111,7 @@
 }
 
 inline
-void interrupt()
+BOOST_TASK_DECL void interrupt()
 {
         task::detail::worker * w( task::detail::worker::tss_get() );
         BOOST_ASSERT( w);
@@ -118,4 +120,6 @@
 }
 }}
 
+#include <boost/config/abi_suffix.hpp>
+
 #endif // BOOST_TASK_UTILITY_H

Modified: sandbox/task/libs/task/src/default_pool.cpp
==============================================================================
--- sandbox/task/libs/task/src/default_pool.cpp (original)
+++ sandbox/task/libs/task/src/default_pool.cpp 2009-05-30 10:50:31 EDT (Sat, 30 May 2009)
@@ -15,6 +15,6 @@
 namespace detail
 {
 default_pool_t
-static_pool::instance( poolsize( thread::hardware_concurrency() ) );
+static_pool::instance = default_pool_t( poolsize( thread::hardware_concurrency() ) );
 }
 } }

Modified: sandbox/task/libs/task/src/semaphore_windows.cpp
==============================================================================
--- sandbox/task/libs/task/src/semaphore_windows.cpp (original)
+++ sandbox/task/libs/task/src/semaphore_windows.cpp 2009-05-30 10:50:31 EDT (Sat, 30 May 2009)
@@ -19,7 +19,7 @@
 semaphore::semaphore( int value)
 : handle_()
 {
- if ( ( handle_ = ::CreateSemaphore( 0, value, std::numeric_limits< int >::max(), 0) ) == 0)
+ if ( ( handle_ = ::CreateSemaphore( 0, value, (std::numeric_limits< int >::max)(), 0) ) == 0)
                 throw system::system_error( ::GetLastError(), system::system_category);
 }
 
@@ -71,7 +71,7 @@
         int value( 0);
         if ( ::WaitForSingleObject( handle_, 0) != WAIT_TIMEOUT)
         {
- if ( ! ::ReleaseSemaphore( handle_, 1, & value) )
+ if ( ! ::ReleaseSemaphore( handle_, 1, ( LPLONG) & value) )
                         throw system::system_error( ::GetLastError(), system::system_category);
                 ++ value;
         }


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