-#if BOOST_VERSION < 105600
- boost::context::jump_fcontext(from->fc_, to->fc_, reinterpret_cast<intptr_t>(to));
-#elif BOOST_VERSION < 106100
- boost::context::jump_fcontext(&from->fc_, to->fc_, reinterpret_cast<intptr_t>(to));
-#else
- BoostContext* ctx[2] = {from, to};
- boost::context::detail::transfer_t arg = boost::context::detail::jump_fcontext(to->fc_, ctx);
- static_cast<BoostContext**>(arg.data)[0]->fc_ = arg.fctx;
-#endif
-}
-
-BoostContext::BoostContext(std::function<void()> code,
- void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
- : Context(std::move(code), cleanup_func, process)
-{
-
- /* if the user provided a function for the process then use it, otherwise it is the context for maestro */
- if (has_code()) {
- this->stack_ = SIMIX_context_stack_new();
-// We need to pass the bottom of the stack to make_fcontext, depending on the stack direction it may be the lower
-// or higher address:
-#if PTH_STACKGROWTH == -1
- void* stack = static_cast<char*>(this->stack_) + smx_context_usable_stack_size - 1;
-#else
- void* stack = this->stack_;
-#endif