mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-26 05:41:28 +00:00
5360d05867
This saves the need to install Boost::Thread on each of the build systems.
143 lines
14 KiB
HTML
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 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 List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>tinythread.h File Reference</h1><code>#include <pthread.h></code><br/>
|
|
<code>#include <signal.h></code><br/>
|
|
<code>#include <sched.h></code><br/>
|
|
<code>#include <unistd.h></code><br/>
|
|
<code>#include <ostream></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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html">mutex</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html">thread</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1ratio.html">ratio< N, D ></a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread.html">tthread</a></td></tr>
|
|
|
|
<p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Main name space for TinyThread++. </p>
|
|
<br/></td></tr>
|
|
</p>
|
|
<tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html">tthread::chrono</a></td></tr>
|
|
|
|
<p><tr><td class="mdescLeft"> </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 </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"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#af1d2d7842598b143f8e0a54a9b6f5bec">TINYTHREAD_VERSION_MAJOR</a> 1</td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#a9248a2e6daaeb43e46bd632417cb4733">TINYTHREAD_VERSION_MINOR</a> 0</td></tr>
|
|
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#a9a3d5a9159f22201a37dd59d82b1861f">TINYTHREAD_VERSION</a> (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">TinyThread++ version (full version). <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">thread_local</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t, <br class="typebreak"/>
|
|
ratio< 1, 1000000000 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a1396eccd0048d613bae0a745b55fa624">nanoseconds</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t, <br class="typebreak"/>
|
|
ratio< 1, 1000000 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#add152055d7a764f3c1e5af1710f8814f">microseconds</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t, <br class="typebreak"/>
|
|
ratio< 1, 1000 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75">milliseconds</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a302ea2e096592e90ec58ccdcc6ec42c3">seconds</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t, <br class="typebreak"/>
|
|
ratio< 60 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#a2a9e93851a6aee0eb47cc6379287ee16">minutes</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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< __intmax_t, <br class="typebreak"/>
|
|
ratio< 3600 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf">hours</a></td></tr>
|
|
<tr><td class="mdescLeft"> </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 </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"> </td><td class="mdescRight">Return the thread ID of the calling thread. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd">yield</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Yield execution to another thread. <a href="#a867ef7ad1dd6026b7ee13bb013e00edd"></a><br/></td></tr>
|
|
<tr><td class="memTemplParams" colspan="2">template<class _Rep , class _Period > </td></tr>
|
|
<tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398">sleep_for</a> (const chrono::duration< _Rep, _Period > &aTime)</td></tr>
|
|
<tr><td class="mdescLeft"> </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
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
|
|
</body>
|
|
</html>
|