]> git.sesse.net Git - casparcg/blob - dependencies64/boost/boost/coroutine/detail/trampoline_push.hpp
Add updates to the basic casparcg.config illustrating the possible options for use...
[casparcg] / dependencies64 / boost / boost / coroutine / detail / trampoline_push.hpp
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_COROUTINES_DETAIL_TRAMPOLINE_PUSH_H
8 #define BOOST_COROUTINES_DETAIL_TRAMPOLINE_PUSH_H
9
10 #include <cstddef>
11
12 #include <boost/assert.hpp>
13 #include <boost/config.hpp>
14 #include <boost/cstdint.hpp>
15 #include <boost/exception_ptr.hpp>
16 #include <boost/move/move.hpp>
17
18 #include <boost/coroutine/detail/config.hpp>
19 #include <boost/coroutine/detail/flags.hpp>
20 #include <boost/coroutine/detail/parameters.hpp>
21 #include <boost/coroutine/detail/setup.hpp>
22 #include <boost/coroutine/detail/setup.hpp>
23 #include <boost/coroutine/exceptions.hpp>
24 #include <boost/coroutine/flags.hpp>
25
26 #ifdef BOOST_HAS_ABI_HEADERS
27 #  include BOOST_ABI_PREFIX
28 #endif
29
30 namespace boost {
31 namespace coroutines {
32 namespace detail {
33
34 template< typename Coro >
35 void trampoline_push( intptr_t vp)
36 {
37     typedef typename Coro::param_type   param_type;
38
39     BOOST_ASSERT( vp);
40
41     param_type * param(
42         reinterpret_cast< param_type * >( vp) );
43     BOOST_ASSERT( 0 != param);
44     BOOST_ASSERT( 0 != param->data);
45
46     Coro * coro(
47         reinterpret_cast< Coro * >( param->coro) );
48     BOOST_ASSERT( 0 != coro);
49
50     coro->run( param->data);
51 }
52
53 template< typename Coro >
54 void trampoline_push_void( intptr_t vp)
55 {
56     typedef typename Coro::param_type   param_type;
57
58     BOOST_ASSERT( vp);
59
60     param_type * param(
61         reinterpret_cast< param_type * >( vp) );
62     BOOST_ASSERT( 0 != param);
63
64     Coro * coro(
65         reinterpret_cast< Coro * >( param->coro) );
66     BOOST_ASSERT( 0 != coro);
67
68     coro->run();
69 }
70
71 }}}
72
73 #ifdef BOOST_HAS_ABI_HEADERS
74 #  include BOOST_ABI_SUFFIX
75 #endif
76
77 #endif // BOOST_COROUTINES_DETAIL_TRAMPOLINE_PUSH_H