• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Class stack_context</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Coroutine">
8<link rel="up" href="../stack.html" title="Stack allocation">
9<link rel="prev" href="stack_traits.html" title="Class stack_traits">
10<link rel="next" href="valgrind.html" title="Support for valgrind">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="stack_traits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stack.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="valgrind.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="coroutine.stack.stack_context"></a><a class="link" href="stack_context.html" title="Class stack_context">Class <span class="emphasis"><em>stack_context</em></span></a>
28</h3></div></div></div>
29<p>
30        <span class="bold"><strong>Boost.Coroutine</strong></span> provides the class <span class="emphasis"><em>stack_context</em></span>
31        which will contain the stack pointer and the size of the stack. In case of
32        a <span class="emphasis"><em>segmented-stack</em></span>, <span class="emphasis"><em>stack_context</em></span>
33        contains some extra control structures.
34      </p>
35<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">stack_context</span>
36<span class="special">{</span>
37    <span class="keyword">void</span>    <span class="special">*</span>   <span class="identifier">sp</span><span class="special">;</span>
38    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">;</span>
39
40    <span class="comment">// might contain additional control structures</span>
41    <span class="comment">// for instance for segmented stacks</span>
42<span class="special">}</span>
43</pre>
44<h5>
45<a name="coroutine.stack.stack_context.h0"></a>
46        <span class="phrase"><a name="coroutine.stack.stack_context._code__phrase_role__keyword__void__phrase___phrase_role__special_____phrase___phrase_role__identifier__sp__phrase___code_"></a></span><a class="link" href="stack_context.html#coroutine.stack.stack_context._code__phrase_role__keyword__void__phrase___phrase_role__special_____phrase___phrase_role__identifier__sp__phrase___code_"><code class="computeroutput"><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">sp</span></code></a>
47      </h5>
48<div class="variablelist">
49<p class="title"><b></b></p>
50<dl class="variablelist">
51<dt><span class="term">Value:</span></dt>
52<dd><p>
53              Pointer to the beginning of the stack.
54            </p></dd>
55</dl>
56</div>
57<h5>
58<a name="coroutine.stack.stack_context.h1"></a>
59        <span class="phrase"><a name="coroutine.stack.stack_context._code__phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase___code_"></a></span><a class="link" href="stack_context.html#coroutine.stack.stack_context._code__phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase___code_"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>
60        <span class="identifier">size</span></code></a>
61      </h5>
62<div class="variablelist">
63<p class="title"><b></b></p>
64<dl class="variablelist">
65<dt><span class="term">Value:</span></dt>
66<dd><p>
67              Actual size of the stack.
68            </p></dd>
69</dl>
70</div>
71</div>
72<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
73<td align="left"></td>
74<td align="right"><div class="copyright-footer">Copyright © 2009 Oliver Kowalke<p>
75        Distributed under the Boost Software License, Version 1.0. (See accompanying
76        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
77      </p>
78</div></td>
79</tr></table>
80<hr>
81<div class="spirit-nav">
82<a accesskey="p" href="stack_traits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stack.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="valgrind.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
83</div>
84</body>
85</html>
86