summaryrefslogtreecommitdiff
path: root/boost/coroutine/detail/pull_coroutine_object.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/coroutine/detail/pull_coroutine_object.hpp')
-rw-r--r--boost/coroutine/detail/pull_coroutine_object.hpp47
1 files changed, 21 insertions, 26 deletions
diff --git a/boost/coroutine/detail/pull_coroutine_object.hpp b/boost/coroutine/detail/pull_coroutine_object.hpp
index cfe34bd3c9..57ae169d80 100644
--- a/boost/coroutine/detail/pull_coroutine_object.hpp
+++ b/boost/coroutine/detail/pull_coroutine_object.hpp
@@ -16,6 +16,7 @@
#include <boost/coroutine/detail/config.hpp>
#include <boost/coroutine/detail/coroutine_context.hpp>
#include <boost/coroutine/detail/flags.hpp>
+#include <boost/coroutine/detail/preallocated.hpp>
#include <boost/coroutine/detail/pull_coroutine_impl.hpp>
#include <boost/coroutine/detail/trampoline_pull.hpp>
#include <boost/coroutine/exceptions.hpp>
@@ -41,9 +42,9 @@ struct pull_coroutine_context
coroutine_context callee;
template< typename Coro >
- pull_coroutine_context( stack_context const& stack_ctx, Coro *) :
+ pull_coroutine_context( preallocated const& palloc, Coro *) :
caller(),
- callee( trampoline_pull< Coro >, stack_ctx)
+ callee( trampoline_pull< Coro >, palloc)
{}
};
@@ -72,25 +73,23 @@ private:
public:
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
pull_coroutine_object( Fn fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
fpu_preserved == attrs.preserve_fpu),
fn_( fn),
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}
#endif
pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
@@ -100,7 +99,7 @@ public:
#else
fn_( boost::forward< Fn >( fn) ),
#endif
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}
@@ -160,25 +159,23 @@ private:
public:
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
pull_coroutine_object( Fn fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
fpu_preserved == attrs.preserve_fpu),
fn_( fn),
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}
#endif
pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
@@ -188,7 +185,7 @@ public:
#else
fn_( boost::forward< Fn >( fn) ),
#endif
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}
@@ -248,25 +245,23 @@ private:
public:
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
pull_coroutine_object( Fn fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
fpu_preserved == attrs.preserve_fpu),
fn_( fn),
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}
#endif
pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- stack_context const& stack_ctx,
- stack_context const& internal_stack_ctx,
+ preallocated const& palloc,
StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( internal_stack_ctx, this),
+ ctx_t( palloc, this),
base_t( & this->caller,
& this->callee,
stack_unwind == attrs.do_unwind,
@@ -276,7 +271,7 @@ public:
#else
fn_( boost::forward< Fn >( fn) ),
#endif
- stack_ctx_( stack_ctx),
+ stack_ctx_( palloc.sctx),
stack_alloc_( stack_alloc)
{}