port from boost.context and boost.coroute