1 
2 //          Copyright Oliver Kowalke 2009.
3 // Distributed under the Boost Software License, Version 1.0.
4 //    (See accompanying file LICENSE_1_0.txt or copy at
5 //          http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef BOOST_CONTEXT_DETAIL_FCONTEXT_H
8 #define BOOST_CONTEXT_DETAIL_FCONTEXT_H
9 
10 #include <boost/config.hpp>
11 #include <boost/cstdint.hpp>
12 
13 #include <boost/context/detail/config.hpp>
14 
15 #ifdef BOOST_HAS_ABI_HEADERS
16 # include BOOST_ABI_PREFIX
17 #endif
18 
19 namespace boost {
20 namespace context {
21 namespace detail {
22 
23 typedef void*   fcontext_t;
24 
25 struct transfer_t {
26     fcontext_t  fctx;
27     void    *   data;
28 };
29 
30 extern "C" BOOST_CONTEXT_DECL
31 transfer_t BOOST_CONTEXT_CALLDECL jump_fcontext( fcontext_t const to, void * vp);
32 extern "C" BOOST_CONTEXT_DECL
33 fcontext_t BOOST_CONTEXT_CALLDECL make_fcontext( void * sp, std::size_t size, void (* fn)( transfer_t) );
34 
35 // based on an idea of Giovanni Derreta
36 extern "C" BOOST_CONTEXT_DECL
37 transfer_t BOOST_CONTEXT_CALLDECL ontop_fcontext( fcontext_t const to, void * vp, transfer_t (* fn)( transfer_t) );
38 
39 }}}
40 
41 #ifdef BOOST_HAS_ABI_HEADERS
42 # include BOOST_ABI_SUFFIX
43 #endif
44 
45 #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_H
46 
47