From 2ed71ab0f11c02f5e36aad8eaa82a53b14405d35 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 19 Feb 2018 15:15:57 +0100 Subject: [PATCH 1/2] unit-test:do not build for ucontext on Android --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index de8436d..f612dce 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -31,7 +31,7 @@ project boost/coroutine2/test rule configure-impl ( properties * ) { local result ; - if ( darwin in $(properties) ) + if ( darwin in $(properties) || android in $(properties) ) { result = no ; } From 0cc5d85b89f84df719850d95f6d4fd8dba956385 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 19 Feb 2018 16:03:01 +0100 Subject: [PATCH 2/2] fix bug introduced after switch to boost::context::fiber --- include/boost/coroutine2/detail/push_control_block_cc.ipp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/coroutine2/detail/push_control_block_cc.ipp b/include/boost/coroutine2/detail/push_control_block_cc.ipp index 91c51b2..a7c0be3 100644 --- a/include/boost/coroutine2/detail/push_control_block_cc.ipp +++ b/include/boost/coroutine2/detail/push_control_block_cc.ipp @@ -67,7 +67,8 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc, // set termination flags state |= state_t::complete; // jump back - return std::move( other->c).resume(); + other->c = std::move( other->c).resume(); + return std::move( other->c); }, std::forward< Fn >( fn) ) }, #else @@ -189,7 +190,8 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo // set termination flags state |= state_t::complete; // jump back - other->c = std::move( other->c).resume(); + other->c = std::move( other->c).resume(); + return std::move( other->c); }, std::forward< Fn >( fn) ) }, #else