~ai.tron/armagetronad/0.4-winlibs-updated

« back to all changes in this revision

Viewing changes to boost/includes/boost/coroutine/detail/coroutine_context.hpp

  • Committer: Nik K.
  • Date: 2013-11-07 16:58:35 UTC
  • Revision ID: nik.karbaum@gmail.com-20131107165835-kq99jz23drfj4dkh
Forgot to add some files; here they are

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_CONTEXT_H
 
8
#define BOOST_COROUTINES_DETAIL_COROUTINE_CONTEXT_H
 
9
 
 
10
#include <cstddef>
 
11
 
 
12
#include <boost/assert.hpp>
 
13
#include <boost/config.hpp>
 
14
#include <boost/context/fcontext.hpp>
 
15
 
 
16
#include <boost/coroutine/detail/config.hpp>
 
17
#include "boost/coroutine/stack_context.hpp"
 
18
 
 
19
#ifdef BOOST_HAS_ABI_HEADERS
 
20
#  include BOOST_ABI_PREFIX
 
21
#endif
 
22
 
 
23
#if defined(BOOST_USE_SEGMENTED_STACKS)
 
24
extern "C"  void *__splitstack_makecontext(
 
25
        std::size_t, void * [BOOST_COROUTINES_SEGMENTS], std::size_t *);
 
26
#endif
 
27
 
 
28
namespace boost {
 
29
namespace coroutines {
 
30
namespace detail {
 
31
 
 
32
 
 
33
class BOOST_COROUTINES_DECL coroutine_context : private context::fcontext_t,
 
34
                                                private stack_context
 
35
                    
 
36
{
 
37
private:
 
38
    stack_context       *   stack_ctx_;
 
39
    context::fcontext_t *   ctx_;
 
40
 
 
41
public:
 
42
    typedef void( * ctx_fn)( intptr_t);
 
43
 
 
44
    coroutine_context();
 
45
 
 
46
    explicit coroutine_context( ctx_fn, stack_context *);
 
47
 
 
48
    coroutine_context( coroutine_context const&);
 
49
 
 
50
    coroutine_context& operator=( coroutine_context const&);
 
51
 
 
52
    intptr_t jump( coroutine_context &, intptr_t = 0, bool = true);
 
53
};
 
54
 
 
55
}}}
 
56
 
 
57
#ifdef BOOST_HAS_ABI_HEADERS
 
58
#  include BOOST_ABI_SUFFIX
 
59
#endif
 
60
 
 
61
#endif // BOOST_COROUTINES_DETAIL_COROUTINE_CONTEXT_H