~pavel-pimenov/dcplusplus/flylinkdc-mediainfo

« back to all changes in this revision

Viewing changes to boost/boost/coroutine/detail/coroutine_object.hpp

  • Committer: pavel pimenov
  • Date: 2013-06-21 16:01:07 UTC
  • mfrom: (2636.1.678 trunk)
  • Revision ID: pavel.pimenov@gmail.com-20130621160107-icvvzptxavbbbhpx
* [merge]

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_COROUTINE_OBJECT_H
 
8
#define BOOST_COROUTINES_DETAIL_COROUTINE_OBJECT_H
 
9
 
 
10
#include <boost/assert.hpp>
 
11
#include <boost/config.hpp>
 
12
#include <boost/cstdint.hpp>
 
13
#include <boost/exception_ptr.hpp>
 
14
#include <boost/move/move.hpp>
 
15
#include <boost/ref.hpp>
 
16
#include <boost/tuple/tuple.hpp>
 
17
#include <boost/type_traits/function_traits.hpp>
 
18
 
 
19
#include <boost/coroutine/attributes.hpp>
 
20
#include <boost/coroutine/detail/arg.hpp>
 
21
#include <boost/coroutine/detail/config.hpp>
 
22
#include <boost/coroutine/detail/coroutine_base.hpp>
 
23
#include <boost/coroutine/detail/exceptions.hpp>
 
24
#include <boost/coroutine/detail/flags.hpp>
 
25
#include <boost/coroutine/detail/holder.hpp>
 
26
#include <boost/coroutine/detail/param.hpp>
 
27
#include <boost/coroutine/flags.hpp>
 
28
 
 
29
#ifdef BOOST_HAS_ABI_HEADERS
 
30
#  include BOOST_ABI_PREFIX
 
31
#endif
 
32
 
 
33
namespace boost {
 
34
namespace coroutines {
 
35
namespace detail {
 
36
 
 
37
template< typename Coroutine >
 
38
void trampoline1( intptr_t vp)
 
39
{
 
40
    BOOST_ASSERT( vp);
 
41
 
 
42
    reinterpret_cast< Coroutine * >( vp)->run();
 
43
}
 
44
 
 
45
template< typename Coroutine, typename Arg >
 
46
void trampoline2( intptr_t vp)
 
47
{
 
48
    BOOST_ASSERT( vp);
 
49
 
 
50
    tuple< Coroutine *, Arg > * tpl(
 
51
        reinterpret_cast< tuple< Coroutine *, Arg > * >( vp) );
 
52
    Coroutine * coro( get< 0 >( * tpl) );
 
53
    Arg arg( get< 1 >( * tpl) );
 
54
 
 
55
    coro->run( arg);
 
56
}
 
57
 
 
58
template<
 
59
    typename Signature,
 
60
    typename Fn, typename StackAllocator, typename Allocator,
 
61
    typename Caller,
 
62
    typename Result, int arity
 
63
>
 
64
class coroutine_object;
 
65
 
 
66
#include <boost/coroutine/detail/coroutine_object_void_0.ipp>
 
67
#include <boost/coroutine/detail/coroutine_object_void_1.ipp>
 
68
#include <boost/coroutine/detail/coroutine_object_void_arity.ipp>
 
69
#include <boost/coroutine/detail/coroutine_object_result_0.ipp>
 
70
#include <boost/coroutine/detail/coroutine_object_result_1.ipp>
 
71
#include <boost/coroutine/detail/coroutine_object_result_arity.ipp>
 
72
 
 
73
}}}
 
74
 
 
75
#ifdef BOOST_HAS_ABI_HEADERS
 
76
#  include BOOST_ABI_SUFFIX
 
77
#endif
 
78
 
 
79
#endif // BOOST_COROUTINES_DETAIL_COROUTINE_OBJECT_H