// Copyright Oliver Kowalke 2009.// Distributed under the Boost Software License, Version 1.0.// (See accompanying file LICENSE_1_0.txt or copy at// http://www.boost.org/LICENSE_1_0.txt)#include <boost/context/detail/fcontext.hpp>usingboost::context::detail::fcontext_t;usingboost::context::detail::transfer_t;// This C++ tail of ontop_fcontext() allocates transfer_t{ from, vp }// on the stack. If fn() throws a C++ exception, then the C++ runtime// must remove this tail's stack frame.extern"C"transfer_tontop_fcontext_tail(intignore,void*vp,transfer_t(*fn)(transfer_t),fcontext_tconstfrom){returnfn(transfer_t{from,vp});}