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_ATTRIBUTES_H
8 #define BOOST_COROUTINES_ATTRIBUTES_H
9 
10 #include <cstddef>
11 
12 #include <boost/config.hpp>
13 
14 #include <boost/coroutine/flags.hpp>
15 #include <boost/coroutine/stack_allocator.hpp>
16 
17 #ifdef BOOST_HAS_ABI_HEADERS
18 #  include BOOST_ABI_PREFIX
19 #endif
20 
21 namespace boost {
22 namespace coroutines {
23 
24 struct attributes
25 {
26     std::size_t     size;
27     flag_unwind_t   do_unwind;
28     flag_fpu_t      preserve_fpu;
29 
attributesboost::coroutines::attributes30     attributes() BOOST_NOEXCEPT :
31         size( stack_allocator::traits_type::default_size() ),
32         do_unwind( stack_unwind),
33         preserve_fpu( fpu_preserved)
34     {}
35 
attributesboost::coroutines::attributes36     explicit attributes( std::size_t size_) BOOST_NOEXCEPT :
37         size( size_),
38         do_unwind( stack_unwind),
39         preserve_fpu( fpu_preserved)
40     {}
41 
attributesboost::coroutines::attributes42     explicit attributes( flag_unwind_t do_unwind_) BOOST_NOEXCEPT :
43         size( stack_allocator::traits_type::default_size() ),
44         do_unwind( do_unwind_),
45         preserve_fpu( fpu_preserved)
46     {}
47 
attributesboost::coroutines::attributes48     explicit attributes( flag_fpu_t preserve_fpu_) BOOST_NOEXCEPT :
49         size( stack_allocator::traits_type::default_size() ),
50         do_unwind( stack_unwind),
51         preserve_fpu( preserve_fpu_)
52     {}
53 
attributesboost::coroutines::attributes54     explicit attributes(
55             std::size_t size_,
56             flag_unwind_t do_unwind_) BOOST_NOEXCEPT :
57         size( size_),
58         do_unwind( do_unwind_),
59         preserve_fpu( fpu_preserved)
60     {}
61 
attributesboost::coroutines::attributes62     explicit attributes(
63             std::size_t size_,
64             flag_fpu_t preserve_fpu_) BOOST_NOEXCEPT :
65         size( size_),
66         do_unwind( stack_unwind),
67         preserve_fpu( preserve_fpu_)
68     {}
69 
attributesboost::coroutines::attributes70     explicit attributes(
71             flag_unwind_t do_unwind_,
72             flag_fpu_t preserve_fpu_) BOOST_NOEXCEPT :
73         size( stack_allocator::traits_type::default_size() ),
74         do_unwind( do_unwind_),
75         preserve_fpu( preserve_fpu_)
76     {}
77 
attributesboost::coroutines::attributes78     explicit attributes(
79             std::size_t size_,
80             flag_unwind_t do_unwind_,
81             flag_fpu_t preserve_fpu_) BOOST_NOEXCEPT :
82         size( size_),
83         do_unwind( do_unwind_),
84         preserve_fpu( preserve_fpu_)
85     {}
86 };
87 
88 }}
89 
90 #ifdef BOOST_HAS_ABI_HEADERS
91 #  include BOOST_ABI_SUFFIX
92 #endif
93 
94 #endif // BOOST_COROUTINES_ATTRIBUTES_H
95