Update-Installer/external/TinyThread/doc/html/tinythread_8h.html
Robert Knight 5360d05867 Remove dependency on Boost::Thread and use the TinyThread library instead.
This saves the need to install Boost::Thread on each of the build systems.
2011-08-22 14:00:00 +01:00

143 lines
14 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TinyThread++: tinythread.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>tinythread.h File Reference</h1><code>#include &lt;pthread.h&gt;</code><br/>
<code>#include &lt;signal.h&gt;</code><br/>
<code>#include &lt;sched.h&gt;</code><br/>
<code>#include &lt;unistd.h&gt;</code><br/>
<code>#include &lt;ostream&gt;</code><br/>
<p><a href="tinythread_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html">mutex</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mutex class. <a href="classtthread_1_1mutex.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recursive mutex class. <a href="classtthread_1_1recursive__mutex.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html">lock_guard&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lock guard class. <a href="classtthread_1_1lock__guard.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Condition variable class. <a href="classtthread_1_1condition__variable.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html">thread</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread class. <a href="classtthread_1_1thread.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread ID. <a href="classtthread_1_1thread_1_1id.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1ratio.html">ratio&lt; N, D &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Minimal implementation of the <code>ratio</code> class. <a href="classtthread_1_1ratio.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration&lt; _Rep, _Period &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration template class. <a href="classtthread_1_1chrono_1_1duration.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread.html">tthread</a></td></tr>
<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Main name space for TinyThread++. </p>
<br/></td></tr>
</p>
<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html">tthread::chrono</a></td></tr>
<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Minimal implementation of the <code>chrono</code> namespace. </p>
<br/></td></tr>
</p>
<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html">tthread::this_thread</a></td></tr>
<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The namespace <code><a class="el" href="namespacetthread_1_1this__thread.html" title="The namespace this_thread provides methods for dealing with the calling thread.">this_thread</a></code> provides methods for dealing with the calling thread. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af1d2d7842598b143f8e0a54a9b6f5bec"></a><!-- doxytag: member="tinythread.h::TINYTHREAD_VERSION_MAJOR" ref="af1d2d7842598b143f8e0a54a9b6f5bec" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#af1d2d7842598b143f8e0a54a9b6f5bec">TINYTHREAD_VERSION_MAJOR</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TinyThread++ version (major number). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9248a2e6daaeb43e46bd632417cb4733"></a><!-- doxytag: member="tinythread.h::TINYTHREAD_VERSION_MINOR" ref="a9248a2e6daaeb43e46bd632417cb4733" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#a9248a2e6daaeb43e46bd632417cb4733">TINYTHREAD_VERSION_MINOR</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TinyThread++ version (minor number). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a3d5a9159f22201a37dd59d82b1861f"></a><!-- doxytag: member="tinythread.h::TINYTHREAD_VERSION" ref="a9a3d5a9159f22201a37dd59d82b1861f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#a9a3d5a9159f22201a37dd59d82b1861f">TINYTHREAD_VERSION</a>&nbsp;&nbsp;&nbsp;(TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TinyThread++ version (full version). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">thread_local</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread local storage keyword. <a href="#ad4d9b405bcbffaf0d4dae6166c18aa1e"></a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1396eccd0048d613bae0a745b55fa624"></a><!-- doxytag: member="tinythread.h::nanoseconds" ref="a1396eccd0048d613bae0a745b55fa624" args="" -->
typedef duration&lt; __intmax_t, <br class="typebreak"/>
ratio&lt; 1, 1000000000 &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a1396eccd0048d613bae0a745b55fa624">nanoseconds</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit nanoseconds. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add152055d7a764f3c1e5af1710f8814f"></a><!-- doxytag: member="tinythread.h::microseconds" ref="add152055d7a764f3c1e5af1710f8814f" args="" -->
typedef duration&lt; __intmax_t, <br class="typebreak"/>
ratio&lt; 1, 1000000 &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#add152055d7a764f3c1e5af1710f8814f">microseconds</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit microseconds. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cf88065d403d0e61022510769380b75"></a><!-- doxytag: member="tinythread.h::milliseconds" ref="a2cf88065d403d0e61022510769380b75" args="" -->
typedef duration&lt; __intmax_t, <br class="typebreak"/>
ratio&lt; 1, 1000 &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75">milliseconds</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit milliseconds. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a302ea2e096592e90ec58ccdcc6ec42c3"></a><!-- doxytag: member="tinythread.h::seconds" ref="a302ea2e096592e90ec58ccdcc6ec42c3" args="" -->
typedef duration&lt; __intmax_t &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a302ea2e096592e90ec58ccdcc6ec42c3">seconds</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit seconds. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a9e93851a6aee0eb47cc6379287ee16"></a><!-- doxytag: member="tinythread.h::minutes" ref="a2a9e93851a6aee0eb47cc6379287ee16" args="" -->
typedef duration&lt; __intmax_t, <br class="typebreak"/>
ratio&lt; 60 &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a2a9e93851a6aee0eb47cc6379287ee16">minutes</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit minutes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af212c337748be0da79f5a3a509f36cdf"></a><!-- doxytag: member="tinythread.h::hours" ref="af212c337748be0da79f5a3a509f36cdf" args="" -->
typedef duration&lt; __intmax_t, <br class="typebreak"/>
ratio&lt; 3600 &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf">hours</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Duration with the unit hours. <br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9370620a3920b9ec550f84fb44fb032"></a><!-- doxytag: member="tinythread.h::get_id" ref="ab9370620a3920b9ec550f84fb44fb032" args="()" -->
thread::id&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html#ab9370620a3920b9ec550f84fb44fb032">get_id</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the thread ID of the calling thread. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd">yield</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Yield execution to another thread. <a href="#a867ef7ad1dd6026b7ee13bb013e00edd"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class _Rep , class _Period &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398">sleep_for</a> (const chrono::duration&lt; _Rep, _Period &gt; &amp;aTime)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Blocks the calling thread for a period of time. <a href="#acba48c6dbf12d38ab816c18c1ef96398"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ad4d9b405bcbffaf0d4dae6166c18aa1e"></a><!-- doxytag: member="tinythread.h::thread_local" ref="ad4d9b405bcbffaf0d4dae6166c18aa1e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define thread_local</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Thread local storage keyword. </p>
<p>A variable that is declared with the <code>thread_local</code> keyword makes the value of the variable local to each thread (known as thread-local storage, or TLS). Example usage: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// This variable is local to each thread.</span>
<a class="code" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e" title="Thread local storage keyword.">thread_local</a> <span class="keywordtype">int</span> variable;
</pre></div> <dl class="note"><dt><b>Note:</b></dt><dd>The <code>thread_local</code> keyword is a macro that maps to the corresponding compiler directive (e.g. <code>__declspec(thread)</code>). While the C++0x standard allows for non-trivial types (e.g. classes with constructors and destructors) to be declared with the <code>thread_local</code> keyword, most pre-C++0x compilers only allow for trivial types (e.g. <code>int</code>). So, to guarantee portable code, only use trivial types for thread local storage. </dd>
<dd>
This directive is currently not supported on Mac OS X (it will give a compiler error), since compile-time TLS is not supported in the Mac OS X executable format. Also, some older versions of MinGW (before GCC 4.x) do not support this directive. </dd></dl>
</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>