Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57682 - in sandbox/fiber: boost/fiber boost/fiber/detail libs/fiber/build libs/fiber/src
From: oliver.kowalke_at_[hidden]
Date: 2009-11-15 06:52:28


Author: olli
Date: 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
New Revision: 57682
URL: http://svn.boost.org/trac/boost/changeset/57682

Log:
-refactoring

Text files modified:
   sandbox/fiber/boost/fiber/detail/fiber_info_base_posix.hpp | 2 --
   sandbox/fiber/boost/fiber/detail/fiber_info_base_windows.hpp | 2 --
   sandbox/fiber/boost/fiber/fiber.hpp | 1 +
   sandbox/fiber/libs/fiber/build/Jamfile.v2 | 6 ++++++
   sandbox/fiber/libs/fiber/src/fiber.cpp | 4 ----
   sandbox/fiber/libs/fiber/src/fiber_posix.cpp | 8 ++++++++
   sandbox/fiber/libs/fiber/src/fiber_windows.cpp | 12 +++++++++++-
   7 files changed, 26 insertions(+), 9 deletions(-)

Modified: sandbox/fiber/boost/fiber/detail/fiber_info_base_posix.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/detail/fiber_info_base_posix.hpp (original)
+++ sandbox/fiber/boost/fiber/detail/fiber_info_base_posix.hpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -37,8 +37,6 @@
         shared_array< char > uctx_stack;
         fiber_state_t state;
 
- static void convert_thread_to_fiber() {}
-
         fiber_info_base();
 
         fiber_info_base( attributes const&);

Modified: sandbox/fiber/boost/fiber/detail/fiber_info_base_windows.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/detail/fiber_info_base_windows.hpp (original)
+++ sandbox/fiber/boost/fiber/detail/fiber_info_base_windows.hpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -36,8 +36,6 @@
         LPVOID uctx;
         fiber_state_t state;
 
- static void convert_thread_to_fiber() {}
-
         fiber_info_base();
 
         fiber_info_base( attributes const&);

Modified: sandbox/fiber/boost/fiber/fiber.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/fiber.hpp (original)
+++ sandbox/fiber/boost/fiber/fiber.hpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -81,6 +81,7 @@
         class id;
 
         static void convert_thread_to_fiber();
+ static void convert_fiber_to_thread();
 
         fiber();
 

Modified: sandbox/fiber/libs/fiber/build/Jamfile.v2
==============================================================================
--- sandbox/fiber/libs/fiber/build/Jamfile.v2 (original)
+++ sandbox/fiber/libs/fiber/build/Jamfile.v2 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -10,6 +10,11 @@
 import indirect ;
 import path ;
 
+if [ os.name ] = HP
+{
+ lib atomic ;
+}
+
 project boost/fiber
     : source-location
         ../src
@@ -19,6 +24,7 @@
         <link>static:<define>BOOST_FIBER_BUILD_LIB=1
         <link>shared:<define>BOOST_FIBER_BUILD_DLL=1
         <threading>multi
+ <os>HPUX:<library>atomic
     : default-build
         <threading>multi
     ;

Modified: sandbox/fiber/libs/fiber/src/fiber.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/fiber.cpp (original)
+++ sandbox/fiber/libs/fiber/src/fiber.cpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -17,10 +17,6 @@
 namespace boost {
 namespace fibers {
 
-void
-fiber::convert_thread_to_fiber()
-{ detail::fiber_info_base::convert_thread_to_fiber(); }
-
 #ifdef BOOST_HAS_RVALUE_REFS
 detail::fiber_info_base::ptr_t
 fiber::make_info_( attributes attrs, void ( * fn)() )

Modified: sandbox/fiber/libs/fiber/src/fiber_posix.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/fiber_posix.cpp (original)
+++ sandbox/fiber/libs/fiber/src/fiber_posix.cpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -64,6 +64,14 @@
                                 system::system_category) );
 }
 
+void
+fiber::convert_thread_to_fiber()
+{}
+
+void
+fiber::convert_fiber_to_thread()
+{}
+
 }}
 
 #include <boost/config/abi_suffix.hpp>

Modified: sandbox/fiber/libs/fiber/src/fiber_windows.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/fiber_windows.cpp (original)
+++ sandbox/fiber/libs/fiber/src/fiber_windows.cpp 2009-11-15 06:52:27 EST (Sun, 15 Nov 2009)
@@ -25,7 +25,7 @@
 namespace boost {
 namespace fiber {
 
-VOID trampoline( LPVOID vp)
+LPVOID trampoline( LPVOID vp)
 {
         detail::fiberinfo_base * self(
                         static_cast< detail::fiber_info_base * >( vp) );
@@ -72,6 +72,16 @@
                                 system::system_category) );
 }
 
+void
+fiber::convert_fiber_to_thread()
+{
+ if ( ! ::ConvertFiberToThread( 0) )
+ throw system::system_error(
+ system::error_code(
+ ::GetLastError(),
+ system::system_category) );
+}
+
 }}
 
 #include <boost/config/abi_suffix.hpp>


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