update caller in pull_type::operator()/push_type::operator()

This commit is contained in:
Oliver Kowalke 2015-09-18 17:27:25 +02:00
parent 5c65e916a7
commit f58d7387e4
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,7 @@ pull_coroutine< T >::control_block::~control_block() {
template< typename T >
void
pull_coroutine< T >::control_block::resume() {
caller = boost::context::execution_context::current();
callee( preserve_fpu);
if ( except) {
std::rethrow_exception( except);
@ -159,6 +160,7 @@ pull_coroutine< T & >::control_block::~control_block() {
template< typename T >
void
pull_coroutine< T & >::control_block::resume() {
caller = boost::context::execution_context::current();
callee( preserve_fpu);
if ( except) {
std::rethrow_exception( except);
@ -233,6 +235,7 @@ pull_coroutine< void >::control_block::~control_block() {
inline
void
pull_coroutine< void >::control_block::resume() {
caller = boost::context::execution_context::current();
callee( preserve_fpu);
if ( except) {
std::rethrow_exception( except);

View File

@ -89,6 +89,7 @@ push_coroutine< T >::control_block::resume( T const& t_) {
// pass an pointer (address of tmp) to other context
T tmp( t_);
t = & tmp;
caller = boost::context::execution_context::current();
callee( preserve_fpu);
t = nullptr;
if ( except) {
@ -107,6 +108,7 @@ push_coroutine< T >::control_block::resume( T && t_) {
// pass an pointer (address of tmp) to other context
T tmp( std::move( t_) );
t = & tmp;
caller = boost::context::execution_context::current();
callee( preserve_fpu);
t = nullptr;
if ( except) {
@ -184,6 +186,7 @@ template< typename T >
void
push_coroutine< T & >::control_block::resume( T & t_) {
t = & t_;
caller = boost::context::execution_context::current();
callee( preserve_fpu);
t = nullptr;
if ( except) {
@ -256,6 +259,7 @@ push_coroutine< void >::control_block::~control_block() {
inline
void
push_coroutine< void >::control_block::resume() {
caller = boost::context::execution_context::current();
callee( preserve_fpu);
if ( except) {
std::rethrow_exception( except);