diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/context/stack_context.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/context/stack_context.hpp')
-rw-r--r-- | boost/context/stack_context.hpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/boost/context/stack_context.hpp b/boost/context/stack_context.hpp new file mode 100644 index 0000000000..48863b3bc8 --- /dev/null +++ b/boost/context/stack_context.hpp @@ -0,0 +1,67 @@ + +// Copyright Oliver Kowalke 2014. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CONTEXT_STACK_CONTEXT_H +#define BOOST_CONTEXT_STACK_CONTEXT_H + +#include <cstddef> + +#include <boost/config.hpp> + +#include <boost/context/detail/config.hpp> + +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif + +namespace boost { +namespace context { + +#if defined(BOOST_USE_SEGMENTED_STACKS) +struct stack_context { + typedef void * segments_context[BOOST_CONTEXT_SEGMENTS]; + + std::size_t size; + void * sp; + segments_context segments_ctx; +#if defined(BOOST_USE_VALGRIND) + unsigned valgrind_stack_id; +#endif + + stack_context() : + size( 0), + sp( 0), + segments_ctx() +#if defined(BOOST_USE_VALGRIND) + , valgrind_stack_id( 0) +#endif + {} +}; +#else +struct stack_context { + std::size_t size; + void * sp; +#if defined(BOOST_USE_VALGRIND) + unsigned valgrind_stack_id; +#endif + + stack_context() : + size( 0), + sp( 0) +#if defined(BOOST_USE_VALGRIND) + , valgrind_stack_id( 0) +#endif + {} +}; +#endif + +}} + +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + +#endif // BOOST_CONTEXT_STACK_CONTEXT_H |