libcopp  2.2.0
fcontext.hpp
Go to the documentation of this file.
1 // Copyright 2023 owent
2 
3 #pragma once
4 
5 #include <libcopp/utils/config/libcopp_build_features.h>
6 
7 #if defined(__PGI)
8 # include <stdint.h>
9 #endif
10 
11 #if defined(_WIN32_WCE)
12 using intptr_t = int;
13 #endif
14 
15 #include <stdint.h>
16 #include <cstddef>
17 
19 #include "libcopp/utils/features.h"
20 
21 #ifdef COPP_HAS_ABI_HEADERS
22 # include COPP_ABI_PREFIX
23 #endif
24 
25 LIBCOPP_COPP_NAMESPACE_BEGIN
26 namespace fcontext {
27 using fcontext_t = void*;
28 
29 struct transfer_t {
31  void* data;
32 };
33 
35  void* vp);
36 
38  std::size_t size,
39  void (*fn)(transfer_t));
40 
43 } // namespace fcontext
44 LIBCOPP_COPP_NAMESPACE_END
45 
46 #ifdef COPP_HAS_ABI_HEADERS
47 # include COPP_ABI_SUFFIX
48 #endif
#define COPP_BOOST_CONTEXT_DECL
Definition: config.hpp:24
#define COPP_BOOST_CONTEXT_CALLDECL
Definition: config.hpp:33
COPP_BOOST_CONTEXT_DECL transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_ontop_fcontext_v2(fcontext_t const to, void *vp, transfer_t(*fn)(transfer_t))
COPP_BOOST_CONTEXT_DECL fcontext_t COPP_BOOST_CONTEXT_CALLDECL copp_make_fcontext_v2(void *sp, std::size_t size, void(*fn)(transfer_t))
COPP_BOOST_CONTEXT_DECL transfer_t COPP_BOOST_CONTEXT_CALLDECL copp_jump_fcontext_v2(fcontext_t const to, void *vp)
constexpr auto size(TCONTAINER &&container) -> decltype(container.size())
Definition: span.h:44