mirror of
https://github.com/boostorg/coroutine.git
synced 2026-02-10 11:22:32 +00:00
206 lines
17 KiB
HTML
206 lines
17 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Attributes</title>
|
|
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
|
<link rel="home" href="../index.html" title="Chapter 1. Coroutine">
|
|
<link rel="up" href="../index.html" title="Chapter 1. Coroutine">
|
|
<link rel="prev" href="coroutine/unidirect/push_coro.html" title="Class coroutine<>::push_type">
|
|
<link rel="next" href="stack.html" title="Stack allocation">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
|
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="coroutine/unidirect/push_coro.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="stack.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
|
<a name="coroutine.attributes"></a><a class="link" href="attributes.html" title="Attributes">Attributes</a>
|
|
</h2></div></div></div>
|
|
<p>
|
|
Class <code class="computeroutput"><span class="identifier">attributes</span></code> is used to
|
|
transfers parameters required to setup a coroutines's context.
|
|
</p>
|
|
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">attributes</span>
|
|
<span class="special">{</span>
|
|
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">;</span>
|
|
<span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind</span><span class="special">;</span>
|
|
<span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu</span><span class="special">;</span>
|
|
|
|
<span class="identifier">attributes</span><span class="special">()</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_</span><span class="special">,</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_</span><span class="special">,</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
|
|
<span class="keyword">explicit</span> <span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind_</span><span class="special">,</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu_</span><span class="special">)</span> <span class="identifier">BOOST_NOEXCEPT</span><span class="special">;</span>
|
|
<span class="special">};</span>
|
|
</pre>
|
|
<h4>
|
|
<a name="coroutine.attributes.h0"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special______phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special______phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">()</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Default constructor using <code class="computeroutput"><span class="identifier">ctx</span><span class="special">::</span><span class="identifier">default_stacksize</span><span class="special">()</span></code>, does unwind the stack after coroutine/generator
|
|
is complete and preserves FPU registers.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h1"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>
|
|
<span class="identifier">size</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Argument <code class="computeroutput"><span class="identifier">size</span></code> defines
|
|
stack size of the inner <code class="computeroutput"><span class="identifier">context</span></code>.
|
|
Stack unwinding after termination and preserving FPU registers is set
|
|
by default.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h2"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Argument <code class="computeroutput"><span class="identifier">do_unwind</span></code> determines
|
|
if stack will be unwound after termination or not. The default stacksize
|
|
is used for the inner <code class="computeroutput"><span class="identifier">context</span></code>
|
|
and FPU registers are preserved.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h3"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Argument <code class="computeroutput"><span class="identifier">preserve_fpu</span></code>
|
|
determines if FPU register have to be preserved if a <code class="computeroutput"><span class="identifier">context</span></code>
|
|
switches. THe default stacksize is used for the inner <code class="computeroutput"><span class="identifier">context</span></code>
|
|
and the stack will be unwound after termination.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h4"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>
|
|
<span class="identifier">size</span><span class="special">,</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Arguments <code class="computeroutput"><span class="identifier">size</span></code> and <code class="computeroutput"><span class="identifier">do_unwind</span></code> are given by the user. FPU
|
|
registers preserved during each <code class="computeroutput"><span class="identifier">context</span></code>
|
|
switch.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h5"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>
|
|
<span class="identifier">size</span><span class="special">,</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Arguments <code class="computeroutput"><span class="identifier">size</span></code> and <code class="computeroutput"><span class="identifier">preserve_fpu</span></code> are given by the user.
|
|
The stack is automatically unwound after coroutine/generator terminates.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
<h4>
|
|
<a name="coroutine.attributes.h6"></a>
|
|
<span><a name="coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"></a></span><a class="link" href="attributes.html#coroutine.attributes._code__phrase_role__identifier__attributes__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_unwind_t__phrase___phrase_role__identifier__do_unwind__phrase__phrase_role__special_____phrase___phrase_role__identifier__flag_fpu_t__phrase___phrase_role__identifier__preserve_fpu__phrase__phrase_role__special_____phrase___code_"><code class="computeroutput"><span class="identifier">attributes</span><span class="special">(</span> <span class="identifier">flag_unwind_t</span> <span class="identifier">do_unwind</span><span class="special">,</span> <span class="identifier">flag_fpu_t</span> <span class="identifier">preserve_fpu</span><span class="special">)</span></code></a>
|
|
</h4>
|
|
<div class="variablelist">
|
|
<p class="title"><b></b></p>
|
|
<dl>
|
|
<dt><span class="term">Effects:</span></dt>
|
|
<dd><p>
|
|
Arguments <code class="computeroutput"><span class="identifier">do_unwind</span></code> and
|
|
<code class="computeroutput"><span class="identifier">preserve_fpu</span></code> are given
|
|
by the user. The stack gets a default value of <code class="computeroutput"><span class="identifier">ctx</span><span class="special">::</span><span class="identifier">default_stacksize</span><span class="special">()</span></code>.
|
|
</p></dd>
|
|
<dt><span class="term">Throws:</span></dt>
|
|
<dd><p>
|
|
Nothing.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2009 Oliver Kowalke<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
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>)
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="coroutine/unidirect/push_coro.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="stack.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|