Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57731 - in sandbox/fiber: boost/fiber boost/fiber/detail libs/fiber/src
From: oliver.kowalke_at_[hidden]
Date: 2009-11-17 15:43:21


Author: olli
Date: 2009-11-17 15:43:20 EST (Tue, 17 Nov 2009)
New Revision: 57731
URL: http://svn.boost.org/trac/boost/changeset/57731

Log:
- suppress warnings for Windows
- execute at_exit-handlers on Windows
Text files modified:
   sandbox/fiber/boost/fiber/detail/fiber_info_base_windows.hpp | 11 +++++++++--
   sandbox/fiber/boost/fiber/detail/scheduler_impl.hpp | 9 +++++++++
   sandbox/fiber/boost/fiber/fiber.hpp | 9 +++++++++
   sandbox/fiber/boost/fiber/scheduler.hpp | 9 +++++++++
   sandbox/fiber/libs/fiber/src/fiber_info_base_windows.cpp | 2 --
   sandbox/fiber/libs/fiber/src/fiber_windows.cpp | 15 +++++++++------
   6 files changed, 45 insertions(+), 10 deletions(-)

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-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -7,8 +7,6 @@
 #ifndef BOOST_FIBERS_DETAIL_FIBER_INFO_WINDOWS_H
 #define BOOST_FIBERS_DETAIL_FIBER_INFO_WINDOWS_H
 
-#define _WIN32_WINNT 0x0501
-
 extern "C" {
 
 #include <windows.h>
@@ -27,6 +25,11 @@
 
 #include <boost/config/abi_prefix.hpp>
 
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251 4275)
+# endif
+
 namespace boost {
 namespace fibers {
 namespace detail {
@@ -61,6 +64,10 @@
 
 }}}
 
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif // BOOST_FIBERS_DETAIL_FIBER_INFO_WINDOWS_H

Modified: sandbox/fiber/boost/fiber/detail/scheduler_impl.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/detail/scheduler_impl.hpp (original)
+++ sandbox/fiber/boost/fiber/detail/scheduler_impl.hpp 2009-11-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -21,6 +21,11 @@
 
 #include <boost/config/abi_prefix.hpp>
 
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251 4275)
+# endif
+
 namespace boost {
 namespace fibers {
 namespace detail {
@@ -101,6 +106,10 @@
 
 }}}
 
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif // BOOST_FIBERS_DETAIL_SCHEDULER_IMPL_H

Modified: sandbox/fiber/boost/fiber/fiber.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/fiber.hpp (original)
+++ sandbox/fiber/boost/fiber/fiber.hpp 2009-11-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -23,6 +23,11 @@
 
 #include <boost/config/abi_prefix.hpp>
 
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251 4275)
+# endif
+
 namespace boost {
 namespace fibers {
 namespace detail {
@@ -297,6 +302,10 @@
 
 }
 
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif // BOOST_FIBERS_FIBER_H

Modified: sandbox/fiber/boost/fiber/scheduler.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/scheduler.hpp (original)
+++ sandbox/fiber/boost/fiber/scheduler.hpp 2009-11-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -23,6 +23,11 @@
 
 #include <boost/config/abi_prefix.hpp>
 
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251 4275)
+# endif
+
 namespace boost {
 
 namespace this_fiber {
@@ -154,6 +159,10 @@
 
 }}
 
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif // BOOST_FIBERS_SCHEDULER_H

Modified: sandbox/fiber/libs/fiber/src/fiber_info_base_windows.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/src/fiber_info_base_windows.cpp (original)
+++ sandbox/fiber/libs/fiber/src/fiber_info_base_windows.cpp 2009-11-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -4,8 +4,6 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#define _WIN32_WINNT 0x0501
-
 #include <boost/fiber/detail/fiber_info_base_windows.hpp>
 
 #include <cerrno>

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-17 15:43:20 EST (Tue, 17 Nov 2009)
@@ -4,8 +4,6 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#define _WIN32_WINNT 0x0501
-
 #include <boost/fiber/fiber.hpp>
 
 extern "C" {
@@ -33,10 +31,15 @@
         BOOST_ASSERT( self);
         try
         { self->run(); }
- catch ( fiber_interrupted const&)
- {}
- catch (...)
- {}
+ catch ( fiber_interrupted const&) {}
+ catch (...) {}
+ while ( ! self->at_exit.empty() )
+ {
+ detail::fiber_info_base::callable_t ca;
+ self->at_exit.top().swap( ca);
+ self->at_exit.pop();
+ ca();
+ }
          this_fiber::cancel();
 }
 


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