libcopp  1.1.0
fcontext.hpp
Go to the documentation of this file.
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 _COPP_BOOST_CONTEXT_FCONTEXT_H
8 #define _COPP_BOOST_CONTEXT_FCONTEXT_H
9 
10 #if defined(__PGI)
11 #include <stdint.h>
12 #endif
13 
14 #if defined(_WIN32_WCE)
15 typedef int intptr_t;
16 #endif
17 
18 #include <cstddef>
19 #include <stdint.h>
20 
21 #include "libcopp/utils/features.h"
23 
24 #ifdef COPP_HAS_ABI_HEADERS
25 # include COPP_ABI_PREFIX
26 #endif
27 
28 namespace copp {
29  namespace fcontext {
30  typedef void* fcontext_t;
31 
32  struct transfer_t {
33  fcontext_t fctx;
34  void * data;
35  };
36 
37  extern "C" COPP_BOOST_CONTEXT_DECL
38  transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_jump_fcontext(fcontext_t const to, void * vp);
39 
40  extern "C" COPP_BOOST_CONTEXT_DECL
41  fcontext_t COPP_BOOST_CONTEXT_CALLDECL copp_make_fcontext(void * sp, std::size_t size, void (* fn)( transfer_t));
42 
43  extern "C" COPP_BOOST_CONTEXT_DECL
44  transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_ontop_fcontext( fcontext_t const to, void * vp, transfer_t (* fn)( transfer_t) );
45  }
46 }
47 
48 #ifdef COPP_HAS_ABI_HEADERS
49 # include COPP_ABI_SUFFIX
50 #endif
51 
52 #endif // _COPP_BOOST_CONTEXT_FCONTEXT_H
53 
#define COPP_BOOST_CONTEXT_DECL
Definition: config.hpp:18
COPP_BOOST_CONTEXT_DECL fcontext_t COPP_BOOST_CONTEXT_CALLDECL copp_make_fcontext(void *sp, std::size_t size, void(*fn)(transfer_t))
COPP_BOOST_CONTEXT_DECL transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_ontop_fcontext(fcontext_t const to, void *vp, transfer_t(*fn)(transfer_t))
COPP_BOOST_CONTEXT_DECL transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_jump_fcontext(fcontext_t const to, void *vp)
void * fcontext_t
Definition: fcontext.hpp:30
#define COPP_BOOST_CONTEXT_CALLDECL
Definition: config.hpp:28