Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55625 - in sandbox/task: boost/task/detail libs/task/examples
From: oliver.kowalke_at_[hidden]
Date: 2009-08-17 07:58:56


Author: olli
Date: 2009-08-17 07:58:55 EDT (Mon, 17 Aug 2009)
New Revision: 55625
URL: http://svn.boost.org/trac/boost/changeset/55625

Log:
- bugfixes for fiber_windows.hpp + examples
Text files modified:
   sandbox/task/boost/task/detail/fiber_windows.hpp | 16 ++++++++--------
   sandbox/task/libs/task/examples/no_deadlock_pool.cpp | 5 ++---
   sandbox/task/libs/task/examples/no_deadlock_pool2.cpp | 6 +++---
   sandbox/task/libs/task/examples/no_deadlock_pool3.cpp | 5 ++---
   4 files changed, 15 insertions(+), 17 deletions(-)

Modified: sandbox/task/boost/task/detail/fiber_windows.hpp
==============================================================================
--- sandbox/task/boost/task/detail/fiber_windows.hpp (original)
+++ sandbox/task/boost/task/detail/fiber_windows.hpp 2009-08-17 07:58:55 EDT (Mon, 17 Aug 2009)
@@ -20,7 +20,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/system/system_error.hpp>
 
-namespace boost { namespace fibers {
+namespace boost { namespace task {
 namespace detail
 {
 template< typename Fiber >
@@ -48,11 +48,11 @@
         friend
         VOID CALLBACK trampoline( LPVOID);
 
- function< void( context< fiber > &) > fn_;
- std::size_t stack_size_;
- LPVOID caller_;
- LPVOID callee_;
- st_state state_;
+ function< void() > fn_;
+ std::size_t stack_size_;
+ LPVOID caller_;
+ LPVOID callee_;
+ st_state state_;
 
         fiber(
                 function< void() > fn,
@@ -118,14 +118,14 @@
 
         static void convert_thread_to_fiber()
         {
- if ( ! ::ConvertThreadToFiber( 0)_)
+ if ( ! ::ConvertThreadToFiber( 0) )
                                 throw system::system_error(
                                         system::error_code(
                                                 ::GetLastError(),
                                                 system::system_category) );
         }
 
- static sptr-t create(
+ static sptr_t create(
                 function< void() > fn,
                 std::size_t stack_size)
         { return sptr_t( new fiber( fn, stack_size) ); }

Modified: sandbox/task/libs/task/examples/no_deadlock_pool.cpp
==============================================================================
--- sandbox/task/libs/task/examples/no_deadlock_pool.cpp (original)
+++ sandbox/task/libs/task/examples/no_deadlock_pool.cpp 2009-08-17 07:58:55 EDT (Mon, 17 Aug 2009)
@@ -112,9 +112,8 @@
 {
         try
         {
- pool_type pool(
- tsk::poolsize(
- boost::thread::hardware_concurrency() ) );
+ tsk::poolsize psize( boost::thread::hardware_concurrency() );
+ pool_type pool( psize);
 
                 int n = 32;
                 event outer_ev;

Modified: sandbox/task/libs/task/examples/no_deadlock_pool2.cpp
==============================================================================
--- sandbox/task/libs/task/examples/no_deadlock_pool2.cpp (original)
+++ sandbox/task/libs/task/examples/no_deadlock_pool2.cpp 2009-08-17 07:58:55 EDT (Mon, 17 Aug 2009)
@@ -9,6 +9,7 @@
 #include <stdexcept>
 #include <vector>
 
+#include <boost/thread.hpp>
 #include "boost/task.hpp"
 
 namespace tsk = boost::task;
@@ -36,11 +37,10 @@
 {
         try
         {
+ tsk::poolsize psize( boost::thread::hardware_concurrency() );
                 tsk::static_pool<
                         tsk::unbounded_channel< tsk::fifo >
- > pool(
- tsk::poolsize(
- boost::thread::hardware_concurrency() ) );
+ > pool( psize);
 
                 fprintf( stderr, "pool-size == %d\n", pool.size() );
 

Modified: sandbox/task/libs/task/examples/no_deadlock_pool3.cpp
==============================================================================
--- sandbox/task/libs/task/examples/no_deadlock_pool3.cpp (original)
+++ sandbox/task/libs/task/examples/no_deadlock_pool3.cpp 2009-08-17 07:58:55 EDT (Mon, 17 Aug 2009)
@@ -112,9 +112,8 @@
 {
         try
         {
- pool_type pool(
- tsk::poolsize(
- boost::thread::hardware_concurrency() ) );
+ tsk::poolsize psize( boost::thread::hardware_concurrency() );
+ pool_type pool( psize);
 
                 int n = 32;
                 event outer_ev;


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