fix dependencies in make third_party on unix; bump tinyThread to 1.1
@@ -1,44 +0,0 @@
|
||||
<!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++: Alphabetical List</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>Class Index</h1><div class="qindex"><a class="qindex" href="#letter_C">C</a> | <a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div>
|
||||
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td><a name="letter_C"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> C </div></td></tr></table>
|
||||
</td><td><a name="letter_F"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> F </div></td></tr></table>
|
||||
</td><td><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> L </div></td></tr></table>
|
||||
</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td></tr><tr><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td><td><a class="el" href="classtthread_1_1lock__guard.html">lock_guard</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
|
||||
</td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> T </div></td></tr></table>
|
||||
</td></tr><tr><td><a name="letter_D"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> D </div></td></tr></table>
|
||||
</td><td><a name="letter_I"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> I </div></td></tr></table>
|
||||
</td><td><a name="letter_M"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> M </div></td></tr></table>
|
||||
</td><td><a class="el" href="classtthread_1_1ratio.html">ratio</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td><td><a class="el" href="classtthread_1_1thread.html">thread</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td></tr><tr><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a> (<a class="el" href="namespacetthread_1_1chrono.html">tthread::chrono</a>) </td><td><a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a> (<a class="el" href="namespacetthread.html">tthread</a>) </td></tr></table><div class="qindex"><a class="qindex" href="#letter_C">C</a> | <a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></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>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!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++: Member List</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>duration< _Rep, _Period > Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">count</a>() const </td><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration</a>(const _Rep2 &r)</td><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td><td><code> [inline, explicit]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 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>
|
||||
@@ -1,34 +0,0 @@
|
||||
<!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++: Member List</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>ratio< N, D > Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1ratio.html">ratio< N, D ></a>, including all inherited members.<table>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 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>
|
||||
@@ -1,53 +0,0 @@
|
||||
<!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++: ratio< N, D > Class Template 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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1ratio.html">ratio</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>ratio< N, D > Class Template Reference</h1><!-- doxytag: class="tthread::ratio" -->
|
||||
<p>Minimal implementation of the <code>ratio</code> class.
|
||||
<a href="#_details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1ratio-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<h3>template<__intmax_t N, __intmax_t D = 1><br/>
|
||||
class tthread::ratio< N, D ></h3>
|
||||
|
||||
<p>Minimal implementation of the <code>ratio</code> class. </p>
|
||||
<p>This class provides enough functionality to implement some basic <code>chrono</code> classes. </p>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 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>
|
||||
@@ -1,35 +0,0 @@
|
||||
<!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++: Member List</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>id Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1thread_1_1id.html">id</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a>()</td><td><a class="el" href="classtthread_1_1thread_1_1id.html">id</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 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>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,48 +0,0 @@
|
||||
<!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++: fast_mutex.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>fast_mutex.h File Reference</h1><code>#include <pthread.h></code><br/>
|
||||
|
||||
<p><a href="fast__mutex_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_1fast__mutex.html">fast_mutex</a></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast mutex class. <a href="classtthread_1_1fast__mutex.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>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
</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>
|
||||
@@ -1,67 +0,0 @@
|
||||
<!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++: tthread Namespace 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 class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>tthread Namespace Reference</h1>
|
||||
<p>Main name space for TinyThread++.
|
||||
<a href="#_details">More...</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<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_1_1chrono.html">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">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>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_1fast__mutex.html">fast_mutex</a></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast mutex class. <a href="classtthread_1_1fast__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_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</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_1ratio.html">ratio</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>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Main name space for TinyThread++. </p>
|
||||
<p>This namespace is more or less equivalent to the <code>std</code> namespace for the C++0x thread classes. For instance, the <a class="el" href="classtthread_1_1mutex.html" title="Mutex class.">tthread::mutex</a> class corresponds to the std::mutex class. </p>
|
||||
</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>
|
||||
|
Before Width: | Height: | Size: 35 B |
|
Before Width: | Height: | Size: 706 B |
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -1,105 +0,0 @@
|
||||
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
|
||||
|
||||
DIV.tabs
|
||||
{
|
||||
float : left;
|
||||
width : 100%;
|
||||
background : url("tab_b.gif") repeat-x bottom;
|
||||
margin-bottom : 4px;
|
||||
}
|
||||
|
||||
DIV.tabs UL
|
||||
{
|
||||
margin : 0px;
|
||||
padding-left : 10px;
|
||||
list-style : none;
|
||||
}
|
||||
|
||||
DIV.tabs LI, DIV.tabs FORM
|
||||
{
|
||||
display : inline;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs FORM
|
||||
{
|
||||
float : right;
|
||||
}
|
||||
|
||||
DIV.tabs A
|
||||
{
|
||||
float : left;
|
||||
background : url("tab_r.gif") no-repeat right top;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
font-size : 80%;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
DIV.tabs A:hover
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs A:link, DIV.tabs A:visited,
|
||||
DIV.tabs A:active, DIV.tabs A:hover
|
||||
{
|
||||
color: #1A419D;
|
||||
}
|
||||
|
||||
DIV.tabs SPAN
|
||||
{
|
||||
float : left;
|
||||
display : block;
|
||||
background : url("tab_l.gif") no-repeat left top;
|
||||
padding : 5px 9px;
|
||||
white-space : nowrap;
|
||||
}
|
||||
|
||||
DIV.tabs #MSearchBox
|
||||
{
|
||||
float : right;
|
||||
display : inline;
|
||||
font-size : 1em;
|
||||
}
|
||||
|
||||
DIV.tabs TD
|
||||
{
|
||||
font-size : 80%;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Commented Backslash Hack hides rule from IE5-Mac \*/
|
||||
DIV.tabs SPAN {float : none;}
|
||||
/* End IE5-Mac hack */
|
||||
|
||||
DIV.tabs A:hover SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs LI.current A
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
border-width : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs LI.current SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
padding-bottom : 6px;
|
||||
}
|
||||
|
||||
DIV.navpath
|
||||
{
|
||||
background : none;
|
||||
border : none;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
text-align : center;
|
||||
margin : 2px;
|
||||
padding : 2px;
|
||||
}
|
||||
@@ -1,517 +0,0 @@
|
||||
<!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 Source File</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>
|
||||
<h1>tinythread.h</h1><a href="tinythread_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||||
<a name="l00002"></a>00002 <span class="comment">Copyright (c) 2010 Marcus Geelnard</span>
|
||||
<a name="l00003"></a>00003 <span class="comment"></span>
|
||||
<a name="l00004"></a>00004 <span class="comment">This software is provided 'as-is', without any express or implied</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">warranty. In no event will the authors be held liable for any damages</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">arising from the use of this software.</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"></span>
|
||||
<a name="l00008"></a>00008 <span class="comment">Permission is granted to anyone to use this software for any purpose,</span>
|
||||
<a name="l00009"></a>00009 <span class="comment">including commercial applications, and to alter it and redistribute it</span>
|
||||
<a name="l00010"></a>00010 <span class="comment">freely, subject to the following restrictions:</span>
|
||||
<a name="l00011"></a>00011 <span class="comment"></span>
|
||||
<a name="l00012"></a>00012 <span class="comment"> 1. The origin of this software must not be misrepresented; you must not</span>
|
||||
<a name="l00013"></a>00013 <span class="comment"> claim that you wrote the original software. If you use this software</span>
|
||||
<a name="l00014"></a>00014 <span class="comment"> in a product, an acknowledgment in the product documentation would be</span>
|
||||
<a name="l00015"></a>00015 <span class="comment"> appreciated but is not required.</span>
|
||||
<a name="l00016"></a>00016 <span class="comment"></span>
|
||||
<a name="l00017"></a>00017 <span class="comment"> 2. Altered source versions must be plainly marked as such, and must not be</span>
|
||||
<a name="l00018"></a>00018 <span class="comment"> misrepresented as being the original software.</span>
|
||||
<a name="l00019"></a>00019 <span class="comment"></span>
|
||||
<a name="l00020"></a>00020 <span class="comment"> 3. This notice may not be removed or altered from any source</span>
|
||||
<a name="l00021"></a>00021 <span class="comment"> distribution.</span>
|
||||
<a name="l00022"></a>00022 <span class="comment">*/</span>
|
||||
<a name="l00023"></a>00023
|
||||
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef _TINYTHREAD_H_</span>
|
||||
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define _TINYTHREAD_H_</span>
|
||||
<a name="l00026"></a>00026 <span class="preprocessor"></span>
|
||||
<a name="l00057"></a>00057
|
||||
<a name="l00058"></a>00058 <span class="comment">// Which platform are we on?</span>
|
||||
<a name="l00059"></a>00059 <span class="preprocessor">#if !defined(_TTHREAD_PLATFORM_DEFINED_)</span>
|
||||
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)</span>
|
||||
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_WIN32_</span>
|
||||
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
|
||||
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_POSIX_</span>
|
||||
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_PLATFORM_DEFINED_</span>
|
||||
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00067"></a>00067 <span class="preprocessor"></span>
|
||||
<a name="l00068"></a>00068 <span class="comment">// Platform specific includes</span>
|
||||
<a name="l00069"></a>00069 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor"> #include <windows.h></span>
|
||||
<a name="l00071"></a>00071 <span class="preprocessor">#else</span>
|
||||
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"> #include <pthread.h></span>
|
||||
<a name="l00073"></a>00073 <span class="preprocessor"> #include <signal.h></span>
|
||||
<a name="l00074"></a>00074 <span class="preprocessor"> #include <sched.h></span>
|
||||
<a name="l00075"></a>00075 <span class="preprocessor"> #include <unistd.h></span>
|
||||
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
|
||||
<a name="l00077"></a>00077 <span class="preprocessor"></span>
|
||||
<a name="l00078"></a>00078 <span class="comment">// Generic includes</span>
|
||||
<a name="l00079"></a>00079 <span class="preprocessor">#include <ostream></span>
|
||||
<a name="l00080"></a>00080
|
||||
<a name="l00082"></a><a class="code" href="tinythread_8h.html#af1d2d7842598b143f8e0a54a9b6f5bec">00082</a> <span class="preprocessor">#define TINYTHREAD_VERSION_MAJOR 1</span>
|
||||
<a name="l00083"></a>00083 <span class="preprocessor"></span>
|
||||
<a name="l00084"></a><a class="code" href="tinythread_8h.html#a9248a2e6daaeb43e46bd632417cb4733">00084</a> <span class="preprocessor">#define TINYTHREAD_VERSION_MINOR 0</span>
|
||||
<a name="l00085"></a>00085 <span class="preprocessor"></span>
|
||||
<a name="l00086"></a><a class="code" href="tinythread_8h.html#a9a3d5a9159f22201a37dd59d82b1861f">00086</a> <span class="preprocessor">#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)</span>
|
||||
<a name="l00087"></a>00087 <span class="preprocessor"></span>
|
||||
<a name="l00088"></a>00088 <span class="comment">// Do we have a fully featured C++0x compiler?</span>
|
||||
<a name="l00089"></a>00089 <span class="preprocessor">#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L))</span>
|
||||
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_CPP0X_</span>
|
||||
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00092"></a>00092 <span class="preprocessor"></span>
|
||||
<a name="l00093"></a>00093 <span class="comment">// ...at least partial C++0x?</span>
|
||||
<a name="l00094"></a>00094 <span class="preprocessor">#if defined(_TTHREAD_CPP0X_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)</span>
|
||||
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_CPP0X_PARTIAL_</span>
|
||||
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00097"></a>00097 <span class="preprocessor"></span>
|
||||
<a name="l00098"></a>00098 <span class="comment">// Macro for disabling assignments of objects.</span>
|
||||
<a name="l00099"></a>00099 <span class="preprocessor">#ifdef _TTHREAD_CPP0X_PARTIAL_</span>
|
||||
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_DISABLE_ASSIGNMENT(name) \</span>
|
||||
<a name="l00101"></a>00101 <span class="preprocessor"> name(const name&) = delete; \</span>
|
||||
<a name="l00102"></a>00102 <span class="preprocessor"> name& operator=(const name&) = delete;</span>
|
||||
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_DISABLE_ASSIGNMENT(name) \</span>
|
||||
<a name="l00105"></a>00105 <span class="preprocessor"> name(const name&); \</span>
|
||||
<a name="l00106"></a>00106 <span class="preprocessor"> name& operator=(const name&);</span>
|
||||
<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00108"></a>00108 <span class="preprocessor"></span>
|
||||
<a name="l00129"></a>00129
|
||||
<a name="l00130"></a>00130 <span class="preprocessor">#if !defined(_TTHREAD_CPP0X_) && !defined(thread_local)</span>
|
||||
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor"> #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)</span>
|
||||
<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor"> #define thread_local __thread</span>
|
||||
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
|
||||
<a name="l00134"></a><a class="code" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">00134</a> <span class="preprocessor"></span><span class="preprocessor"> #define thread_local __declspec(thread)</span>
|
||||
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00137"></a>00137 <span class="preprocessor"></span>
|
||||
<a name="l00138"></a>00138
|
||||
<a name="l00143"></a>00143 <span class="keyword">namespace </span>tthread {
|
||||
<a name="l00144"></a>00144
|
||||
<a name="l00151"></a><a class="code" href="classtthread_1_1mutex.html">00151</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a> {
|
||||
<a name="l00152"></a>00152 <span class="keyword">public</span>:
|
||||
<a name="l00154"></a><a class="code" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">00154</a> <a class="code" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910" title="Constructor.">mutex</a>()
|
||||
<a name="l00155"></a>00155 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00156"></a>00156 <span class="preprocessor"></span> : mAlreadyLocked(<span class="keyword">false</span>)
|
||||
<a name="l00157"></a>00157 <span class="preprocessor">#endif</span>
|
||||
<a name="l00158"></a>00158 <span class="preprocessor"></span> {
|
||||
<a name="l00159"></a>00159 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00160"></a>00160 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00161"></a>00161 <span class="preprocessor">#else</span>
|
||||
<a name="l00162"></a>00162 <span class="preprocessor"></span> pthread_mutex_init(&mHandle, NULL);
|
||||
<a name="l00163"></a>00163 <span class="preprocessor">#endif</span>
|
||||
<a name="l00164"></a>00164 <span class="preprocessor"></span> }
|
||||
<a name="l00165"></a>00165
|
||||
<a name="l00167"></a><a class="code" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">00167</a> <a class="code" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf" title="Destructor.">~mutex</a>()
|
||||
<a name="l00168"></a>00168 {
|
||||
<a name="l00169"></a>00169 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00170"></a>00170 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00171"></a>00171 <span class="preprocessor">#else</span>
|
||||
<a name="l00172"></a>00172 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00173"></a>00173 <span class="preprocessor">#endif</span>
|
||||
<a name="l00174"></a>00174 <span class="preprocessor"></span> }
|
||||
<a name="l00175"></a>00175
|
||||
<a name="l00180"></a><a class="code" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">00180</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00181"></a>00181 {
|
||||
<a name="l00182"></a>00182 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00183"></a>00183 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00184"></a>00184 <span class="keywordflow">while</span>(mAlreadyLocked) Sleep(1000); <span class="comment">// Simulate deadlock...</span>
|
||||
<a name="l00185"></a>00185 mAlreadyLocked = <span class="keyword">true</span>;
|
||||
<a name="l00186"></a>00186 <span class="preprocessor">#else</span>
|
||||
<a name="l00187"></a>00187 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00188"></a>00188 <span class="preprocessor">#endif</span>
|
||||
<a name="l00189"></a>00189 <span class="preprocessor"></span> }
|
||||
<a name="l00190"></a>00190
|
||||
<a name="l00196"></a><a class="code" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">00196</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00197"></a>00197 {
|
||||
<a name="l00198"></a>00198 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00199"></a>00199 <span class="preprocessor"></span> <span class="keywordtype">bool</span> ret = (TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>);
|
||||
<a name="l00200"></a>00200 <span class="keywordflow">if</span>(ret && mAlreadyLocked)
|
||||
<a name="l00201"></a>00201 {
|
||||
<a name="l00202"></a>00202 LeaveCriticalSection(&mHandle);
|
||||
<a name="l00203"></a>00203 ret = <span class="keyword">false</span>;
|
||||
<a name="l00204"></a>00204 }
|
||||
<a name="l00205"></a>00205 <span class="keywordflow">return</span> ret;
|
||||
<a name="l00206"></a>00206 <span class="preprocessor">#else</span>
|
||||
<a name="l00207"></a>00207 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00208"></a>00208 <span class="preprocessor">#endif</span>
|
||||
<a name="l00209"></a>00209 <span class="preprocessor"></span> }
|
||||
<a name="l00210"></a>00210
|
||||
<a name="l00214"></a><a class="code" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">00214</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00215"></a>00215 {
|
||||
<a name="l00216"></a>00216 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00217"></a>00217 <span class="preprocessor"></span> mAlreadyLocked = <span class="keyword">false</span>;
|
||||
<a name="l00218"></a>00218 LeaveCriticalSection(&mHandle);
|
||||
<a name="l00219"></a>00219 <span class="preprocessor">#else</span>
|
||||
<a name="l00220"></a>00220 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00221"></a>00221 <span class="preprocessor">#endif</span>
|
||||
<a name="l00222"></a>00222 <span class="preprocessor"></span> }
|
||||
<a name="l00223"></a>00223
|
||||
<a name="l00224"></a>00224 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a>)
|
||||
<a name="l00225"></a>00225
|
||||
<a name="l00226"></a>00226 private:
|
||||
<a name="l00227"></a>00227 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00228"></a>00228 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00229"></a>00229 <span class="keywordtype">bool</span> mAlreadyLocked;
|
||||
<a name="l00230"></a>00230 <span class="preprocessor">#else</span>
|
||||
<a name="l00231"></a>00231 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00232"></a>00232 <span class="preprocessor">#endif</span>
|
||||
<a name="l00233"></a>00233 <span class="preprocessor"></span>
|
||||
<a name="l00234"></a>00234 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>;
|
||||
<a name="l00235"></a>00235 };
|
||||
<a name="l00236"></a>00236
|
||||
<a name="l00243"></a><a class="code" href="classtthread_1_1recursive__mutex.html">00243</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1recursive__mutex.html" title="Recursive mutex class.">recursive_mutex</a> {
|
||||
<a name="l00244"></a>00244 <span class="keyword">public</span>:
|
||||
<a name="l00246"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">00246</a> <a class="code" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede" title="Constructor.">recursive_mutex</a>()
|
||||
<a name="l00247"></a>00247 {
|
||||
<a name="l00248"></a>00248 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00249"></a>00249 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00250"></a>00250 <span class="preprocessor">#else</span>
|
||||
<a name="l00251"></a>00251 <span class="preprocessor"></span> pthread_mutexattr_t attr;
|
||||
<a name="l00252"></a>00252 pthread_mutexattr_init(&attr);
|
||||
<a name="l00253"></a>00253 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
<a name="l00254"></a>00254 pthread_mutex_init(&mHandle, &attr);
|
||||
<a name="l00255"></a>00255 <span class="preprocessor">#endif</span>
|
||||
<a name="l00256"></a>00256 <span class="preprocessor"></span> }
|
||||
<a name="l00257"></a>00257
|
||||
<a name="l00259"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100">00259</a> <a class="code" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100" title="Destructor.">~recursive_mutex</a>()
|
||||
<a name="l00260"></a>00260 {
|
||||
<a name="l00261"></a>00261 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00262"></a>00262 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00263"></a>00263 <span class="preprocessor">#else</span>
|
||||
<a name="l00264"></a>00264 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00265"></a>00265 <span class="preprocessor">#endif</span>
|
||||
<a name="l00266"></a>00266 <span class="preprocessor"></span> }
|
||||
<a name="l00267"></a>00267
|
||||
<a name="l00272"></a><a class="code" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d">00272</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00273"></a>00273 {
|
||||
<a name="l00274"></a>00274 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00275"></a>00275 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00276"></a>00276 <span class="preprocessor">#else</span>
|
||||
<a name="l00277"></a>00277 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00278"></a>00278 <span class="preprocessor">#endif</span>
|
||||
<a name="l00279"></a>00279 <span class="preprocessor"></span> }
|
||||
<a name="l00280"></a>00280
|
||||
<a name="l00286"></a><a class="code" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6">00286</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00287"></a>00287 {
|
||||
<a name="l00288"></a>00288 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00289"></a>00289 <span class="preprocessor"></span> <span class="keywordflow">return</span> TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00290"></a>00290 <span class="preprocessor">#else</span>
|
||||
<a name="l00291"></a>00291 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00292"></a>00292 <span class="preprocessor">#endif</span>
|
||||
<a name="l00293"></a>00293 <span class="preprocessor"></span> }
|
||||
<a name="l00294"></a>00294
|
||||
<a name="l00298"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">00298</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00299"></a>00299 {
|
||||
<a name="l00300"></a>00300 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00301"></a>00301 <span class="preprocessor"></span> LeaveCriticalSection(&mHandle);
|
||||
<a name="l00302"></a>00302 <span class="preprocessor">#else</span>
|
||||
<a name="l00303"></a>00303 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00304"></a>00304 <span class="preprocessor">#endif</span>
|
||||
<a name="l00305"></a>00305 <span class="preprocessor"></span> }
|
||||
<a name="l00306"></a>00306
|
||||
<a name="l00307"></a>00307 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1recursive__mutex.html" title="Recursive mutex class.">recursive_mutex</a>)
|
||||
<a name="l00308"></a>00308
|
||||
<a name="l00309"></a>00309 private:
|
||||
<a name="l00310"></a>00310 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00311"></a>00311 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00312"></a>00312 <span class="preprocessor">#else</span>
|
||||
<a name="l00313"></a>00313 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00314"></a>00314 <span class="preprocessor">#endif</span>
|
||||
<a name="l00315"></a>00315 <span class="preprocessor"></span>
|
||||
<a name="l00316"></a>00316 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>;
|
||||
<a name="l00317"></a>00317 };
|
||||
<a name="l00318"></a>00318
|
||||
<a name="l00333"></a>00333
|
||||
<a name="l00334"></a>00334 <span class="keyword">template</span> <<span class="keyword">class</span> T>
|
||||
<a name="l00335"></a><a class="code" href="classtthread_1_1lock__guard.html">00335</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a> {
|
||||
<a name="l00336"></a>00336 <span class="keyword">public</span>:
|
||||
<a name="l00337"></a>00337 <span class="keyword">typedef</span> T mutex_type;
|
||||
<a name="l00338"></a>00338
|
||||
<a name="l00339"></a>00339 <a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a>() : mMutex(0) {}
|
||||
<a name="l00340"></a>00340
|
||||
<a name="l00342"></a><a class="code" href="classtthread_1_1lock__guard.html#a2c5fd14427acb035def5201e4cfd4540">00342</a> <span class="keyword">explicit</span> <a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a>(mutex_type &aMutex)
|
||||
<a name="l00343"></a>00343 {
|
||||
<a name="l00344"></a>00344 mMutex = &aMutex;
|
||||
<a name="l00345"></a>00345 mMutex->lock();
|
||||
<a name="l00346"></a>00346 }
|
||||
<a name="l00347"></a>00347
|
||||
<a name="l00349"></a><a class="code" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d">00349</a> <a class="code" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d" title="The destructor unlocks the mutex.">~lock_guard</a>()
|
||||
<a name="l00350"></a>00350 {
|
||||
<a name="l00351"></a>00351 <span class="keywordflow">if</span>(mMutex)
|
||||
<a name="l00352"></a>00352 mMutex->unlock();
|
||||
<a name="l00353"></a>00353 }
|
||||
<a name="l00354"></a>00354
|
||||
<a name="l00355"></a>00355 <span class="keyword">private</span>:
|
||||
<a name="l00356"></a>00356 mutex_type * mMutex;
|
||||
<a name="l00357"></a>00357 };
|
||||
<a name="l00358"></a>00358
|
||||
<a name="l00384"></a><a class="code" href="classtthread_1_1condition__variable.html">00384</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a> {
|
||||
<a name="l00385"></a>00385 <span class="keyword">public</span>:
|
||||
<a name="l00387"></a>00387 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00388"></a>00388 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9" title="Constructor.">condition_variable</a>();
|
||||
<a name="l00389"></a>00389 <span class="preprocessor">#else</span>
|
||||
<a name="l00390"></a><a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">00390</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9" title="Constructor.">condition_variable</a>()
|
||||
<a name="l00391"></a>00391 {
|
||||
<a name="l00392"></a>00392 pthread_cond_init(&mHandle, NULL);
|
||||
<a name="l00393"></a>00393 }
|
||||
<a name="l00394"></a>00394 <span class="preprocessor">#endif</span>
|
||||
<a name="l00395"></a>00395 <span class="preprocessor"></span>
|
||||
<a name="l00397"></a>00397 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00398"></a>00398 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b" title="Destructor.">~condition_variable</a>();
|
||||
<a name="l00399"></a>00399 <span class="preprocessor">#else</span>
|
||||
<a name="l00400"></a><a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">00400</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b" title="Destructor.">~condition_variable</a>()
|
||||
<a name="l00401"></a>00401 {
|
||||
<a name="l00402"></a>00402 pthread_cond_destroy(&mHandle);
|
||||
<a name="l00403"></a>00403 }
|
||||
<a name="l00404"></a>00404 <span class="preprocessor">#endif</span>
|
||||
<a name="l00405"></a>00405 <span class="preprocessor"></span>
|
||||
<a name="l00411"></a>00411 <span class="keyword">template</span> <<span class="keyword">class</span> _mutexT>
|
||||
<a name="l00412"></a><a class="code" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">00412</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede" title="Wait for the condition.">wait</a>(_mutexT &aMutex)
|
||||
<a name="l00413"></a>00413 {
|
||||
<a name="l00414"></a>00414 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00415"></a>00415 <span class="preprocessor"></span> <span class="comment">// Increment number of waiters</span>
|
||||
<a name="l00416"></a>00416 EnterCriticalSection(&mWaitersCountLock);
|
||||
<a name="l00417"></a>00417 ++ mWaitersCount;
|
||||
<a name="l00418"></a>00418 LeaveCriticalSection(&mWaitersCountLock);
|
||||
<a name="l00419"></a>00419
|
||||
<a name="l00420"></a>00420 <span class="comment">// Release the mutex while waiting for the condition (will decrease</span>
|
||||
<a name="l00421"></a>00421 <span class="comment">// the number of waiters when done)...</span>
|
||||
<a name="l00422"></a>00422 aMutex.unlock();
|
||||
<a name="l00423"></a>00423 _wait();
|
||||
<a name="l00424"></a>00424 aMutex.lock();
|
||||
<a name="l00425"></a>00425 <span class="preprocessor">#else</span>
|
||||
<a name="l00426"></a>00426 <span class="preprocessor"></span> pthread_cond_wait(&mHandle, &aMutex.mHandle);
|
||||
<a name="l00427"></a>00427 <span class="preprocessor">#endif</span>
|
||||
<a name="l00428"></a>00428 <span class="preprocessor"></span> }
|
||||
<a name="l00429"></a>00429
|
||||
<a name="l00435"></a>00435 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00436"></a>00436 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394" title="Notify one thread that is waiting for the condition.">notify_one</a>();
|
||||
<a name="l00437"></a>00437 <span class="preprocessor">#else</span>
|
||||
<a name="l00438"></a><a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394">00438</a> <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394" title="Notify one thread that is waiting for the condition.">notify_one</a>()
|
||||
<a name="l00439"></a>00439 {
|
||||
<a name="l00440"></a>00440 pthread_cond_signal(&mHandle);
|
||||
<a name="l00441"></a>00441 }
|
||||
<a name="l00442"></a>00442 <span class="preprocessor">#endif</span>
|
||||
<a name="l00443"></a>00443 <span class="preprocessor"></span>
|
||||
<a name="l00449"></a>00449 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00450"></a>00450 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326" title="Notify all threads that are waiting for the condition.">notify_all</a>();
|
||||
<a name="l00451"></a>00451 <span class="preprocessor">#else</span>
|
||||
<a name="l00452"></a><a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326">00452</a> <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326" title="Notify all threads that are waiting for the condition.">notify_all</a>()
|
||||
<a name="l00453"></a>00453 {
|
||||
<a name="l00454"></a>00454 pthread_cond_broadcast(&mHandle);
|
||||
<a name="l00455"></a>00455 }
|
||||
<a name="l00456"></a>00456 <span class="preprocessor">#endif</span>
|
||||
<a name="l00457"></a>00457 <span class="preprocessor"></span>
|
||||
<a name="l00458"></a>00458 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>)
|
||||
<a name="l00459"></a>00459
|
||||
<a name="l00460"></a>00460 private:
|
||||
<a name="l00461"></a>00461 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00462"></a>00462 <span class="preprocessor"></span> <span class="keywordtype">void</span> _wait();
|
||||
<a name="l00463"></a>00463 HANDLE mEvents[2];
|
||||
<a name="l00464"></a>00464 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mWaitersCount;
|
||||
<a name="l00465"></a>00465 CRITICAL_SECTION mWaitersCountLock;
|
||||
<a name="l00466"></a>00466 <span class="preprocessor">#else</span>
|
||||
<a name="l00467"></a>00467 <span class="preprocessor"></span> pthread_cond_t mHandle;
|
||||
<a name="l00468"></a>00468 <span class="preprocessor">#endif</span>
|
||||
<a name="l00469"></a>00469 <span class="preprocessor"></span>};
|
||||
<a name="l00470"></a>00470
|
||||
<a name="l00471"></a>00471
|
||||
<a name="l00473"></a><a class="code" href="classtthread_1_1thread.html">00473</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1thread.html" title="Thread class.">thread</a> {
|
||||
<a name="l00474"></a>00474 <span class="keyword">public</span>:
|
||||
<a name="l00475"></a>00475 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00476"></a>00476 <span class="preprocessor"></span> <span class="keyword">typedef</span> HANDLE native_handle_type;
|
||||
<a name="l00477"></a>00477 <span class="preprocessor">#else</span>
|
||||
<a name="l00478"></a>00478 <span class="preprocessor"></span> <span class="keyword">typedef</span> pthread_t native_handle_type;
|
||||
<a name="l00479"></a>00479 <span class="preprocessor">#endif</span>
|
||||
<a name="l00480"></a>00480 <span class="preprocessor"></span>
|
||||
<a name="l00481"></a>00481 <span class="keyword">class </span><a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">id</a>;
|
||||
<a name="l00482"></a>00482
|
||||
<a name="l00486"></a><a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">00486</a> <a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1" title="Default constructor.">thread</a>() : mHandle(0), mNotAThread(true)
|
||||
<a name="l00487"></a>00487 #if defined(_TTHREAD_WIN32_)
|
||||
<a name="l00488"></a>00488 , mWin32ThreadID(0)
|
||||
<a name="l00489"></a>00489 #endif
|
||||
<a name="l00490"></a>00490 {}
|
||||
<a name="l00491"></a>00491
|
||||
<a name="l00500"></a>00500 <a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1" title="Default constructor.">thread</a>(<span class="keywordtype">void</span> (*aFunction)(<span class="keywordtype">void</span> *), <span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00501"></a>00501
|
||||
<a name="l00506"></a>00506 <a class="code" href="classtthread_1_1thread.html#a626c04c85c7e2b10215bc4a35062f177" title="Destructor.">~thread</a>();
|
||||
<a name="l00507"></a>00507
|
||||
<a name="l00509"></a>00509 <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d" title="Wait for the thread to finish (join execution flows).">join</a>();
|
||||
<a name="l00510"></a>00510
|
||||
<a name="l00513"></a>00513 <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1thread.html#a5f02386ef3b6ef614321b6ec3606b242" title="Check if the thread is joinable.">joinable</a>() <span class="keyword">const</span>;
|
||||
<a name="l00514"></a>00514
|
||||
<a name="l00516"></a>00516 <span class="keywordtype">id</span> <a class="code" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5" title="Return the thread ID of a thread object.">get_id</a>() <span class="keyword">const</span>;
|
||||
<a name="l00517"></a>00517
|
||||
<a name="l00521"></a><a class="code" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">00521</a> <span class="keyword">inline</span> native_handle_type <a class="code" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e" title="Get the native handle for this thread.">native_handle</a>()
|
||||
<a name="l00522"></a>00522 {
|
||||
<a name="l00523"></a>00523 <span class="keywordflow">return</span> mHandle;
|
||||
<a name="l00524"></a>00524 }
|
||||
<a name="l00525"></a>00525
|
||||
<a name="l00531"></a>00531 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <a class="code" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d" title="Determine the number of threads which can possibly execute concurrently.">hardware_concurrency</a>();
|
||||
<a name="l00532"></a>00532
|
||||
<a name="l00533"></a>00533 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1thread.html" title="Thread class.">thread</a>)
|
||||
<a name="l00534"></a>00534
|
||||
<a name="l00535"></a>00535 private:
|
||||
<a name="l00536"></a>00536 native_handle_type mHandle;
|
||||
<a name="l00537"></a>00537 mutable <a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a> mDataMutex;
|
||||
<a name="l00538"></a>00538 <span class="keywordtype">bool</span> mNotAThread;
|
||||
<a name="l00539"></a>00539 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00540"></a>00540 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mWin32ThreadID;
|
||||
<a name="l00541"></a>00541 <span class="preprocessor">#endif</span>
|
||||
<a name="l00542"></a>00542 <span class="preprocessor"></span>
|
||||
<a name="l00543"></a>00543 <span class="comment">// This is the internal thread wrapper function.</span>
|
||||
<a name="l00544"></a>00544 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00545"></a>00545 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> WINAPI wrapper_function(<span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00546"></a>00546 <span class="preprocessor">#else</span>
|
||||
<a name="l00547"></a>00547 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">void</span> * wrapper_function(<span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00548"></a>00548 <span class="preprocessor">#endif</span>
|
||||
<a name="l00549"></a>00549 <span class="preprocessor"></span>};
|
||||
<a name="l00550"></a>00550
|
||||
<a name="l00554"></a><a class="code" href="classtthread_1_1thread_1_1id.html">00554</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">thread::id</a> {
|
||||
<a name="l00555"></a>00555 <span class="keyword">public</span>:
|
||||
<a name="l00559"></a><a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">00559</a> <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>() : mId(0) {};
|
||||
<a name="l00560"></a>00560
|
||||
<a name="l00561"></a>00561 <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> aId) : mId(aId) {};
|
||||
<a name="l00562"></a>00562
|
||||
<a name="l00563"></a>00563 <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>(<span class="keyword">const</span> <span class="keywordtype">id</span>& aId) : mId(aId.mId) {};
|
||||
<a name="l00564"></a>00564
|
||||
<a name="l00565"></a>00565 <span class="keyword">inline</span> <span class="keywordtype">id</span> & operator=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId)
|
||||
<a name="l00566"></a>00566 {
|
||||
<a name="l00567"></a>00567 mId = aId.mId;
|
||||
<a name="l00568"></a>00568 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
||||
<a name="l00569"></a>00569 }
|
||||
<a name="l00570"></a>00570
|
||||
<a name="l00571"></a>00571 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00572"></a>00572 {
|
||||
<a name="l00573"></a>00573 <span class="keywordflow">return</span> (aId1.mId == aId2.mId);
|
||||
<a name="l00574"></a>00574 }
|
||||
<a name="l00575"></a>00575
|
||||
<a name="l00576"></a>00576 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00577"></a>00577 {
|
||||
<a name="l00578"></a>00578 <span class="keywordflow">return</span> (aId1.mId != aId2.mId);
|
||||
<a name="l00579"></a>00579 }
|
||||
<a name="l00580"></a>00580
|
||||
<a name="l00581"></a>00581 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00582"></a>00582 {
|
||||
<a name="l00583"></a>00583 <span class="keywordflow">return</span> (aId1.mId <= aId2.mId);
|
||||
<a name="l00584"></a>00584 }
|
||||
<a name="l00585"></a>00585
|
||||
<a name="l00586"></a>00586 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00587"></a>00587 {
|
||||
<a name="l00588"></a>00588 <span class="keywordflow">return</span> (aId1.mId < aId2.mId);
|
||||
<a name="l00589"></a>00589 }
|
||||
<a name="l00590"></a>00590
|
||||
<a name="l00591"></a>00591 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00592"></a>00592 {
|
||||
<a name="l00593"></a>00593 <span class="keywordflow">return</span> (aId1.mId >= aId2.mId);
|
||||
<a name="l00594"></a>00594 }
|
||||
<a name="l00595"></a>00595
|
||||
<a name="l00596"></a>00596 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00597"></a>00597 {
|
||||
<a name="l00598"></a>00598 <span class="keywordflow">return</span> (aId1.mId > aId2.mId);
|
||||
<a name="l00599"></a>00599 }
|
||||
<a name="l00600"></a>00600
|
||||
<a name="l00601"></a>00601 <span class="keyword">inline</span> <span class="keyword">friend</span> std::ostream& operator <<(std::ostream &os, <span class="keyword">const</span> <span class="keywordtype">id</span> &obj)
|
||||
<a name="l00602"></a>00602 {
|
||||
<a name="l00603"></a>00603 os << obj.mId;
|
||||
<a name="l00604"></a>00604 <span class="keywordflow">return</span> os;
|
||||
<a name="l00605"></a>00605 }
|
||||
<a name="l00606"></a>00606
|
||||
<a name="l00607"></a>00607 <span class="keyword">private</span>:
|
||||
<a name="l00608"></a>00608 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> mId;
|
||||
<a name="l00609"></a>00609 };
|
||||
<a name="l00610"></a>00610
|
||||
<a name="l00611"></a>00611
|
||||
<a name="l00612"></a>00612 <span class="comment">// Related to <ratio> - minimal to be able to support chrono.</span>
|
||||
<a name="l00613"></a>00613 <span class="keyword">typedef</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> __intmax_t;
|
||||
<a name="l00614"></a>00614
|
||||
<a name="l00617"></a><a class="code" href="classtthread_1_1ratio.html">00617</a> <span class="keyword">template</span> <__<span class="keywordtype">int</span>max_t N, __<span class="keywordtype">int</span>max_t D = 1> <span class="keyword">class </span><a class="code" href="classtthread_1_1ratio.html" title="Minimal implementation of the ratio class.">ratio</a> {
|
||||
<a name="l00618"></a>00618 <span class="keyword">public</span>:
|
||||
<a name="l00619"></a>00619 <span class="keyword">static</span> <span class="keywordtype">double</span> _as_double() { <span class="keywordflow">return</span> double(N) / double(D); }
|
||||
<a name="l00620"></a>00620 };
|
||||
<a name="l00621"></a>00621
|
||||
<a name="l00624"></a><a class="code" href="namespacetthread_1_1chrono.html">00624</a> <span class="keyword">namespace </span>chrono {
|
||||
<a name="l00627"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html">00627</a> <span class="keyword">template</span> <<span class="keyword">class</span> _Rep, <span class="keyword">class</span> _Period = ratio<1> > <span class="keyword">class </span><a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration</a> {
|
||||
<a name="l00628"></a>00628 <span class="keyword">private</span>:
|
||||
<a name="l00629"></a>00629 _Rep rep_;
|
||||
<a name="l00630"></a>00630 <span class="keyword">public</span>:
|
||||
<a name="l00631"></a>00631 <span class="keyword">typedef</span> _Rep rep;
|
||||
<a name="l00632"></a>00632 <span class="keyword">typedef</span> _Period period;
|
||||
<a name="l00633"></a>00633
|
||||
<a name="l00635"></a>00635 <span class="keyword">template</span> <<span class="keyword">class</span> _Rep2>
|
||||
<a name="l00636"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">00636</a> <span class="keyword">explicit</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e" title="Construct a duration object with the given duration.">duration</a>(<span class="keyword">const</span> _Rep2& r) : rep_(r) {};
|
||||
<a name="l00637"></a>00637
|
||||
<a name="l00639"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">00639</a> rep <a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()<span class="keyword"> const</span>
|
||||
<a name="l00640"></a>00640 <span class="keyword"> </span>{
|
||||
<a name="l00641"></a>00641 <span class="keywordflow">return</span> rep_;
|
||||
<a name="l00642"></a>00642 }
|
||||
<a name="l00643"></a>00643 };
|
||||
<a name="l00644"></a>00644
|
||||
<a name="l00645"></a>00645 <span class="comment">// Standard duration types.</span>
|
||||
<a name="l00646"></a><a class="code" href="namespacetthread_1_1chrono.html#a1396eccd0048d613bae0a745b55fa624">00646</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000000000></a> > <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">nanoseconds</a>;
|
||||
<a name="l00647"></a><a class="code" href="namespacetthread_1_1chrono.html#add152055d7a764f3c1e5af1710f8814f">00647</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000000></a> > <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">microseconds</a>;
|
||||
<a name="l00648"></a><a class="code" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75">00648</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000></a> > <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">milliseconds</a>;
|
||||
<a name="l00649"></a><a class="code" href="namespacetthread_1_1chrono.html#a302ea2e096592e90ec58ccdcc6ec42c3">00649</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t></a> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">seconds</a>;
|
||||
<a name="l00650"></a><a class="code" href="namespacetthread_1_1chrono.html#a2a9e93851a6aee0eb47cc6379287ee16">00650</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<60></a> > <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">minutes</a>;
|
||||
<a name="l00651"></a><a class="code" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf">00651</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<3600></a> > <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">hours</a>;
|
||||
<a name="l00652"></a>00652 }
|
||||
<a name="l00653"></a>00653
|
||||
<a name="l00656"></a><a class="code" href="namespacetthread_1_1this__thread.html">00656</a> <span class="keyword">namespace </span>this_thread {
|
||||
<a name="l00658"></a>00658 <a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">thread::id</a> <a class="code" href="namespacetthread_1_1this__thread.html#ab9370620a3920b9ec550f84fb44fb032" title="Return the thread ID of the calling thread.">get_id</a>();
|
||||
<a name="l00659"></a>00659
|
||||
<a name="l00663"></a><a class="code" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd">00663</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd" title="Yield execution to another thread.">yield</a>()
|
||||
<a name="l00664"></a>00664 {
|
||||
<a name="l00665"></a>00665 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00666"></a>00666 <span class="preprocessor"></span> Sleep(0);
|
||||
<a name="l00667"></a>00667 <span class="preprocessor">#else</span>
|
||||
<a name="l00668"></a>00668 <span class="preprocessor"></span> sched_yield();
|
||||
<a name="l00669"></a>00669 <span class="preprocessor">#endif</span>
|
||||
<a name="l00670"></a>00670 <span class="preprocessor"></span> }
|
||||
<a name="l00671"></a>00671
|
||||
<a name="l00681"></a><a class="code" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398">00681</a> <span class="keyword">template</span> <<span class="keyword">class</span> _Rep, <span class="keyword">class</span> _Period> <span class="keywordtype">void</span> <a class="code" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398" title="Blocks the calling thread for a period of time.">sleep_for</a>(<span class="keyword">const</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">chrono::duration<_Rep, _Period></a>& aTime)
|
||||
<a name="l00682"></a>00682 {
|
||||
<a name="l00683"></a>00683 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00684"></a>00684 <span class="preprocessor"></span> Sleep(<span class="keywordtype">int</span>(<span class="keywordtype">double</span>(aTime.<a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()) * (1000.0 * _Period::_as_double()) + 0.5));
|
||||
<a name="l00685"></a>00685 <span class="preprocessor">#else</span>
|
||||
<a name="l00686"></a>00686 <span class="preprocessor"></span> usleep(<span class="keywordtype">int</span>(<span class="keywordtype">double</span>(aTime.<a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()) * (1000000.0 * _Period::_as_double()) + 0.5));
|
||||
<a name="l00687"></a>00687 <span class="preprocessor">#endif</span>
|
||||
<a name="l00688"></a>00688 <span class="preprocessor"></span> }
|
||||
<a name="l00689"></a>00689 }
|
||||
<a name="l00690"></a>00690
|
||||
<a name="l00691"></a>00691 }
|
||||
<a name="l00692"></a>00692
|
||||
<a name="l00693"></a>00693 <span class="comment">// Define/macro cleanup</span>
|
||||
<a name="l00694"></a>00694 <span class="preprocessor">#undef _TTHREAD_DISABLE_ASSIGNMENT</span>
|
||||
<a name="l00695"></a>00695 <span class="preprocessor"></span>
|
||||
<a name="l00696"></a>00696 <span class="preprocessor">#endif // _TINYTHREAD_H_</span>
|
||||
</pre></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>
|
||||
@@ -1,7 +1,7 @@
|
||||
TinyThread++ v1.0
|
||||
TinyThread++ v1.1
|
||||
=================
|
||||
|
||||
http://tinythread.sourceforge.net
|
||||
http://tinythreadpp.bitsnbites.eu
|
||||
|
||||
|
||||
About
|
||||
@@ -10,8 +10,8 @@ About
|
||||
TinyThread++ is a minimalist, portable, threading library for C++, intended to
|
||||
make it easy to create multi threaded C++ applications.
|
||||
|
||||
The library is closesly modeled after the current C++0x standard (draft), but
|
||||
only a subset is implemented at the moment.
|
||||
The library is closesly modeled after the C++11 standard, but only a subset is
|
||||
implemented at the moment.
|
||||
|
||||
See the documentation in the doc/html directory for more information.
|
||||
|
||||
@@ -48,6 +48,9 @@ Windows/MS Visual Studio:
|
||||
History
|
||||
-------
|
||||
|
||||
v1.1 - 2012.05.07
|
||||
- Added thread::detach().
|
||||
|
||||
v1.0 - 2010.10.01
|
||||
- First non-beta release.
|
||||
- Made mutex non-recursive (according to spec), and added recursive_mutex.
|
||||
@@ -104,7 +107,7 @@ v0.1 - 2010.03.21
|
||||
License
|
||||
-------
|
||||
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -124,3 +127,4 @@ freely, subject to the following restrictions:
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
@@ -31,7 +31,7 @@ PROJECT_NAME = TinyThread++
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.0
|
||||
PROJECT_NUMBER = 1.1
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
@@ -7,29 +7,44 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="current"><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
|
||||
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><table>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td class="indexvalue">Condition variable class </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td><td class="indexvalue">Duration template class </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td class="indexvalue">Fast mutex class </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a></td><td class="indexvalue">Thread ID </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a></td><td class="indexvalue">Thread ID </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a></td><td class="indexvalue">Lock guard class </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td class="indexvalue">Mutex class </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1ratio.html">ratio< N, D ></a></td><td class="indexvalue">Minimal implementation of the <code>ratio</code> class </td></tr>
|
||||
@@ -37,8 +52,8 @@
|
||||
<tr><td class="indexkey"><a class="el" href="classtthread_1_1thread.html">thread</a></td><td class="indexvalue">Thread class </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
dependencies/sources/TinyThread++-1.1/doc/html/bc_s.png
vendored
Normal file
|
After Width: | Height: | Size: 677 B |
59
dependencies/sources/TinyThread++-1.1/doc/html/classes.html
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<!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++: Class Index</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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class Index</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_C">C</a> | <a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div>
|
||||
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td><a name="letter_C"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  C  </div></td></tr></table>
|
||||
</td><td><a name="letter_F"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  F  </div></td></tr></table>
|
||||
</td><td><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  L  </div></td></tr></table>
|
||||
</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td></tr><tr><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td><td><a class="el" href="classtthread_1_1lock__guard.html">lock_guard</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  R  </div></td></tr></table>
|
||||
</td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  T  </div></td></tr></table>
|
||||
</td></tr><tr><td><a name="letter_D"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  D  </div></td></tr></table>
|
||||
</td><td><a name="letter_I"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  I  </div></td></tr></table>
|
||||
</td><td><a name="letter_M"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  M  </div></td></tr></table>
|
||||
</td><td><a class="el" href="classtthread_1_1ratio.html">ratio</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td><td><a class="el" href="classtthread_1_1thread.html">thread</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td></tr><tr><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a> (<a class="el" href="namespacetthread_1_1chrono.html">tthread::chrono</a>)   </td><td><a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a> (<a class="el" href="namespacetthread.html">tthread</a>)   </td></tr></table><div class="qindex"><a class="qindex" href="#letter_C">C</a> | <a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div>
|
||||
</div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
58
dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration-members.html
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<!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++: Member List</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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread_1_1chrono.html">chrono</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">duration< _Rep, _Period > Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">count</a>() const </td><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration</a>(const _Rep2 &r)</td><td><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration< _Rep, _Period ></a></td><td><code> [inline, explicit]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,55 +7,78 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="namespacetthread_1_1chrono.html">chrono</a>::<a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread_1_1chrono.html">chrono</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">duration< _Rep, _Period > Class Template Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>duration< _Rep, _Period > Class Template Reference</h1><!-- doxytag: class="tthread::chrono::duration" -->
|
||||
<!-- doxytag: class="tthread::chrono::duration" -->
|
||||
<p>Duration template class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1chrono_1_1duration.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1chrono_1_1duration-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="a5d86b0d68c98b74e3a6e541c1759ef3e"></a><!-- doxytag: member="tthread::chrono::duration::duration" ref="a5d86b0d68c98b74e3a6e541c1759ef3e" args="(const _Rep2 &r)" -->
|
||||
template<class _Rep2 > </td></tr>
|
||||
<tr><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration</a> (const _Rep2 &r)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a duration object with the given duration. <br/></td></tr>
|
||||
<tr><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration</a> (const _Rep2 &r)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a duration object with the given duration. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f01111f479d27be202983aacb03c020"></a><!-- doxytag: member="tthread::chrono::duration::count" ref="a3f01111f479d27be202983aacb03c020" args="() const " -->
|
||||
rep </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">count</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the value of the duration object. <br/></td></tr>
|
||||
rep </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">count</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the value of the duration object. <br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<h3>template<class _Rep, class _Period = ratio<1>><br/>
|
||||
class tthread::chrono::duration< _Rep, _Period ></h3>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><h3>template<class _Rep, class _Period = ratio<1>><br/>
|
||||
class tthread::chrono::duration< _Rep, _Period ></h3>
|
||||
|
||||
<p>Duration template class. </p>
|
||||
<p>This class provides enough functionality to implement <code><a class="el" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398" title="Blocks the calling thread for a period of time.">this_thread::sleep_for()</a></code>. </p>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
</div><hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,33 +7,54 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">condition_variable Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>condition_variable Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">condition_variable</a>()</td><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326">notify_all</a>()</td><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394">notify_one</a>()</td><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">wait</a>(_mutexT &aMutex)</td><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">~condition_variable</a>()</td><td><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,51 +7,73 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1condition__variable.html">condition_variable</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">condition_variable Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>condition_variable Class Reference</h1><!-- doxytag: class="tthread::condition_variable" -->
|
||||
<!-- doxytag: class="tthread::condition_variable" -->
|
||||
<p>Condition variable class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1condition__variable.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1condition__variable-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9e62a1d1145c820a02469a48099fdfa9"></a><!-- doxytag: member="tthread::condition_variable::condition_variable" ref="a9e62a1d1145c820a02469a48099fdfa9" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">condition_variable</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">condition_variable</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58df09046f5006d4170ae92717f1e50b"></a><!-- doxytag: member="tthread::condition_variable::~condition_variable" ref="a58df09046f5006d4170ae92717f1e50b" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">~condition_variable</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">~condition_variable</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memTemplParams" colspan="2">template<class _mutexT > </td></tr>
|
||||
<tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">wait</a> (_mutexT &aMutex)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for the condition. <a href="#a4d877d804385bde4aacf2156e86faede"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394">notify_one</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Notify one thread that is waiting for the condition. <a href="#a84c2ec0dd971c593883198a323eeb394"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326">notify_all</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Notify all threads that are waiting for the condition. <a href="#ad35a04e61229c15c5211ebff00089326"></a><br/></td></tr>
|
||||
<tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">wait</a> (_mutexT &aMutex)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for the condition. <a href="#a4d877d804385bde4aacf2156e86faede"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394">notify_one</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Notify one thread that is waiting for the condition. <a href="#a84c2ec0dd971c593883198a323eeb394"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326">notify_all</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Notify all threads that are waiting for the condition. <a href="#ad35a04e61229c15c5211ebff00089326"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Condition variable class. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Condition variable class. </p>
|
||||
<p>This is a signalling object for synchronizing the execution flow for several threads. Example usage: </p>
|
||||
<div class="fragment"><pre class="fragment"> <span class="comment">// Shared data and associated mutex and condition variable objects</span>
|
||||
<span class="keywordtype">int</span> count;
|
||||
@@ -73,7 +95,7 @@
|
||||
++ count;
|
||||
cond.notify_all();
|
||||
}
|
||||
</pre></div> <hr/><h2>Member Function Documentation</h2>
|
||||
</pre></div> </div><hr/><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" id="ad35a04e61229c15c5211ebff00089326"></a><!-- doxytag: member="tthread::condition_variable::notify_all" ref="ad35a04e61229c15c5211ebff00089326" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -81,8 +103,7 @@
|
||||
<tr>
|
||||
<td class="memname">void notify_all </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -102,8 +123,7 @@
|
||||
<tr>
|
||||
<td class="memname">void notify_one </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -123,9 +143,8 @@
|
||||
<tr>
|
||||
<td class="memname">void wait </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">_mutexT & </td>
|
||||
<td class="paramname"> <em>aMutex</em></td>
|
||||
<td> ) </td>
|
||||
<td class="paramtype">_mutexT & </td>
|
||||
<td class="paramname"><em>aMutex</em></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -135,8 +154,8 @@
|
||||
<p>Wait for the condition. </p>
|
||||
<p>The function will block the calling thread until the condition variable is woken by <code><a class="el" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394" title="Notify one thread that is waiting for the condition.">notify_one()</a></code>, <code><a class="el" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326" title="Notify all threads that are waiting for the condition.">notify_all()</a></code> or a spurious wake up. </p>
|
||||
<dl><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>aMutex</em> </td><td>A mutex that will be unlocked when the wait operation starts, an locked again as soon as the wait operation is finished. </td></tr>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">aMutex</td><td>A mutex that will be unlocked when the wait operation starts, an locked again as soon as the wait operation is finished. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -147,8 +166,8 @@
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,33 +7,54 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">fast_mutex Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>fast_mutex Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">fast_mutex</a>()</td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">lock</a>()</td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a>()</td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a>()</td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7">~fast_mutex</a>()</td><td><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,55 +7,77 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1fast__mutex.html">fast_mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">fast_mutex Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>fast_mutex Class Reference</h1><!-- doxytag: class="tthread::fast_mutex" -->
|
||||
<!-- doxytag: class="tthread::fast_mutex" -->
|
||||
<p>Fast mutex class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1fast__mutex.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="fast__mutex_8h_source.html">fast_mutex.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1fast__mutex-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed9ff6c4d30b4fe2775a15c6778d96f8"></a><!-- doxytag: member="tthread::fast_mutex::fast_mutex" ref="aed9ff6c4d30b4fe2775a15c6778d96f8" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">fast_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">fast_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5eea296c19289a40d7b76df35ecf72a7"></a><!-- doxytag: member="tthread::fast_mutex::~fast_mutex" ref="a5eea296c19289a40d7b76df35ecf72a7" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7">~fast_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7">~fast_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Fast mutex class. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Fast mutex class. </p>
|
||||
<p>This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. It is similar to the <a class="el" href="classtthread_1_1mutex.html" title="Mutex class.">tthread::mutex</a> class, but instead of using system level functions, it is implemented as an atomic spin lock with very low CPU overhead.</p>
|
||||
<p>The <code><a class="el" href="classtthread_1_1fast__mutex.html" title="Fast mutex class.">fast_mutex</a></code> class is NOT compatible with the <code><a class="el" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a></code> class (however, it IS compatible with the <code><a class="el" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a></code> class). It should also be noted that the <code><a class="el" href="classtthread_1_1fast__mutex.html" title="Fast mutex class.">fast_mutex</a></code> class typically does not provide as accurate thread scheduling as a the standard <code>mutex</code> class does.</p>
|
||||
<p>Because of the limitations of the class, it should only be used in situations where the mutex needs to be locked/unlocked very frequently.</p>
|
||||
<dl class="note"><dt><b>Note:</b></dt><dd>The "fast" version of this class relies on inline assembler language, which is currently only supported for 32/64-bit Intel x86/AMD64 and PowerPC architectures on a limited number of compilers (GNU g++ and MS Visual C++). For other architectures/compilers, system functions are used instead. </dd></dl>
|
||||
<hr/><h2>Member Function Documentation</h2>
|
||||
</div><hr/><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" id="aa81aed607133209dade63a226818224d"></a><!-- doxytag: member="tthread::fast_mutex::lock" ref="aa81aed607133209dade63a226818224d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -63,8 +85,7 @@
|
||||
<tr>
|
||||
<td class="memname">void lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -84,8 +105,7 @@
|
||||
<tr>
|
||||
<td class="memname">bool try_lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -105,8 +125,7 @@
|
||||
<tr>
|
||||
<td class="memname">void unlock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -122,8 +141,8 @@
|
||||
<li><a class="el" href="fast__mutex_8h_source.html">fast_mutex.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,30 +7,51 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1lock__guard.html">lock_guard</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">lock_guard< T > Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>lock_guard< T > Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1lock__guard.html#a2c5fd14427acb035def5201e4cfd4540">lock_guard</a>(mutex_type &aMutex)</td><td><a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a></td><td><code> [inline, explicit]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d">~lock_guard</a>()</td><td><a class="el" href="classtthread_1_1lock__guard.html">lock_guard< T ></a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,45 +7,67 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1lock__guard.html">lock_guard</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1lock__guard.html">lock_guard</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">lock_guard< T > Class Template Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>lock_guard< T > Class Template Reference</h1><!-- doxytag: class="tthread::lock_guard" -->
|
||||
<!-- doxytag: class="tthread::lock_guard" -->
|
||||
<p>Lock guard class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1lock__guard.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1lock__guard-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c5fd14427acb035def5201e4cfd4540"></a><!-- doxytag: member="tthread::lock_guard::lock_guard" ref="a2c5fd14427acb035def5201e4cfd4540" args="(mutex_type &aMutex)" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html#a2c5fd14427acb035def5201e4cfd4540">lock_guard</a> (mutex_type &aMutex)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The constructor locks the mutex. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html#a2c5fd14427acb035def5201e4cfd4540">lock_guard</a> (mutex_type &aMutex)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The constructor locks the mutex. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa54999fb933a139807d39ed05e97aa6d"></a><!-- doxytag: member="tthread::lock_guard::~lock_guard" ref="aa54999fb933a139807d39ed05e97aa6d" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d">~lock_guard</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor unlocks the mutex. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d">~lock_guard</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor unlocks the mutex. <br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<h3>template<class T><br/>
|
||||
class tthread::lock_guard< T ></h3>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><h3>template<class T><br/>
|
||||
class tthread::lock_guard< T ></h3>
|
||||
|
||||
<p>Lock guard class. </p>
|
||||
<p>The constructor locks the mutex, and the destructor unlocks the mutex, so the mutex will automatically be unlocked when the lock guard goes out of scope. Example usage: </p>
|
||||
@@ -57,12 +79,12 @@
|
||||
lock_guard<mutex> guard(m);
|
||||
++ counter;
|
||||
}
|
||||
</pre></div> <hr/>The documentation for this class was generated from the following file:<ul>
|
||||
</pre></div> </div><hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,33 +7,54 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1mutex.html">mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">mutex Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>mutex Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1mutex.html">mutex</a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1mutex.html">mutex</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">lock</a>()</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a>()</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a>()</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a>()</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">~mutex</a>()</td><td><a class="el" href="classtthread_1_1mutex.html">mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,53 +7,75 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1mutex.html">mutex</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1mutex.html">mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">mutex Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>mutex Class Reference</h1><!-- doxytag: class="tthread::mutex" -->
|
||||
<!-- doxytag: class="tthread::mutex" -->
|
||||
<p>Mutex class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1mutex.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1mutex-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef42e2bd0ea2ffa8ce1cdc7e5d183910"></a><!-- doxytag: member="tthread::mutex::mutex" ref="aef42e2bd0ea2ffa8ce1cdc7e5d183910" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ab9328c3addeb57045f45910b10a1cf"></a><!-- doxytag: member="tthread::mutex::~mutex" ref="a3ab9328c3addeb57045f45910b10a1cf" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">~mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">~mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Mutex class. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Mutex class. </p>
|
||||
<p>This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. The mutex is non-recursive (i.e. a program may deadlock if the thread that owns a mutex object calls <a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock()</a> on that object). </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtthread_1_1recursive__mutex.html" title="Recursive mutex class.">recursive_mutex</a> </dd></dl>
|
||||
<hr/><h2>Member Function Documentation</h2>
|
||||
</div><hr/><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" id="aa81aed607133209dade63a226818224d"></a><!-- doxytag: member="tthread::mutex::lock" ref="aa81aed607133209dade63a226818224d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -61,8 +83,7 @@
|
||||
<tr>
|
||||
<td class="memname">void lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -82,8 +103,7 @@
|
||||
<tr>
|
||||
<td class="memname">bool try_lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -103,8 +123,7 @@
|
||||
<tr>
|
||||
<td class="memname">void unlock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -120,8 +139,8 @@
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
55
dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio-members.html
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<!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++: Member List</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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1ratio.html">ratio</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">ratio< N, D > Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1ratio.html">ratio< N, D ></a>, including all inherited members.<table>
|
||||
</table></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
72
dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio.html
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<!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++: ratio< N, D > Class Template 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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1ratio.html">ratio</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">ratio< N, D > Class Template Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<!-- doxytag: class="tthread::ratio" -->
|
||||
<p>Minimal implementation of the <code>ratio</code> class.
|
||||
<a href="classtthread_1_1ratio.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1ratio-members.html">List of all members.</a></p>
|
||||
<table class="memberdecls">
|
||||
</table>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><h3>template<__intmax_t N, __intmax_t D = 1><br/>
|
||||
class tthread::ratio< N, D ></h3>
|
||||
|
||||
<p>Minimal implementation of the <code>ratio</code> class. </p>
|
||||
<p>This class provides enough functionality to implement some basic <code>chrono</code> classes. </p>
|
||||
</div><hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,33 +7,54 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">recursive_mutex Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>recursive_mutex Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d">lock</a>()</td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">recursive_mutex</a>()</td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a>()</td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a>()</td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100">~recursive_mutex</a>()</td><td><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,53 +7,75 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1recursive__mutex.html">recursive_mutex</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">recursive_mutex Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>recursive_mutex Class Reference</h1><!-- doxytag: class="tthread::recursive_mutex" -->
|
||||
<!-- doxytag: class="tthread::recursive_mutex" -->
|
||||
<p>Recursive mutex class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1recursive__mutex.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1recursive__mutex-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a612d33a8905a3de216a8be0467538ede"></a><!-- doxytag: member="tthread::recursive_mutex::recursive_mutex" ref="a612d33a8905a3de216a8be0467538ede" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">recursive_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">recursive_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a571b16a7b52c4d1fb0bdb5ff0482c100"></a><!-- doxytag: member="tthread::recursive_mutex::~recursive_mutex" ref="a571b16a7b52c4d1fb0bdb5ff0482c100" args="()" -->
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100">~recursive_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100">~recursive_mutex</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Try to lock the mutex. <a href="#aa24a64f788f142df670c3abc809d32b6"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a9278be8203e1c42e2619179882ae4403"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Recursive mutex class. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Recursive mutex class. </p>
|
||||
<p>This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. The mutex is recursive (i.e. a thread may lock the mutex several times, as long as it unlocks the mutex the same number of times). </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a> </dd></dl>
|
||||
<hr/><h2>Member Function Documentation</h2>
|
||||
</div><hr/><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" id="aa81aed607133209dade63a226818224d"></a><!-- doxytag: member="tthread::recursive_mutex::lock" ref="aa81aed607133209dade63a226818224d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -61,8 +83,7 @@
|
||||
<tr>
|
||||
<td class="memname">void lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -82,8 +103,7 @@
|
||||
<tr>
|
||||
<td class="memname">bool try_lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -103,8 +123,7 @@
|
||||
<tr>
|
||||
<td class="memname">void unlock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -120,8 +139,8 @@
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,25 +7,47 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread.html">thread</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">thread Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>thread Member List</h1>This is the complete list of members for <a class="el" href="classtthread_1_1thread.html">thread</a>, including all inherited members.<table>
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1thread.html">thread</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34">detach</a>()</td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5">get_id</a>() const </td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d">hardware_concurrency</a>()</td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td><code> [static]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d">join</a>()</td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td></td></tr>
|
||||
@@ -35,8 +57,8 @@
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#ad8d7d1e1d70de55c08472077b2e1a953">thread</a>(void(*aFunction)(void *), void *aArg)</td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread.html#a626c04c85c7e2b10215bc4a35062f177">~thread</a>()</td><td><a class="el" href="classtthread_1_1thread.html">thread</a></td><td></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,61 +7,88 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1thread.html">thread</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread.html">thread</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">thread Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>thread Class Reference</h1><!-- doxytag: class="tthread::thread" -->
|
||||
<!-- doxytag: class="tthread::thread" -->
|
||||
<p>Thread class.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1thread.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1thread-members.html">List of all members.</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_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 colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">thread</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a1816c2a63c2941090f9a24e5a62efea1"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#ad8d7d1e1d70de55c08472077b2e1a953">thread</a> (void(*aFunction)(void *), void *aArg)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Thread starting constructor. <a href="#ad8d7d1e1d70de55c08472077b2e1a953"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a626c04c85c7e2b10215bc4a35062f177">~thread</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a626c04c85c7e2b10215bc4a35062f177"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c7abfff648dad193674fc432ad4840d"></a><!-- doxytag: member="tthread::thread::join" ref="a6c7abfff648dad193674fc432ad4840d" args="()" -->
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d">join</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for the thread to finish (join execution flows). <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a5f02386ef3b6ef614321b6ec3606b242">joinable</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the thread is joinable. <a href="#a5f02386ef3b6ef614321b6ec3606b242"></a><br/></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
||||
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_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 colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">thread</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a1816c2a63c2941090f9a24e5a62efea1"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#ad8d7d1e1d70de55c08472077b2e1a953">thread</a> (void(*aFunction)(void *), void *aArg)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Thread starting constructor. <a href="#ad8d7d1e1d70de55c08472077b2e1a953"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a626c04c85c7e2b10215bc4a35062f177">~thread</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a626c04c85c7e2b10215bc4a35062f177"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d">join</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for the thread to finish (join execution flows). <a href="#a6c7abfff648dad193674fc432ad4840d"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a5f02386ef3b6ef614321b6ec3606b242">joinable</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the thread is joinable. <a href="#a5f02386ef3b6ef614321b6ec3606b242"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34">detach</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Detach from the thread. <a href="#ac295bade8aee589f6718dfa79edc2a34"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb4f4110b330d27774c16baec4f7d4f5"></a><!-- doxytag: member="tthread::thread::get_id" ref="afb4f4110b330d27774c16baec4f7d4f5" args="() const " -->
|
||||
<a class="el" href="classtthread_1_1thread_1_1id.html">id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5">get_id</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the thread ID of a thread object. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">native_handle_type </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">native_handle</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the native handle for this thread. <a href="#ac9ba019ced75a29c52c41aff4e1ca20e"></a><br/></td></tr>
|
||||
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">static unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d">hardware_concurrency</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine the number of threads which can possibly execute concurrently. <a href="#a3b04fb20012111681e37dfe63f105f6d"></a><br/></td></tr>
|
||||
<a class="el" href="classtthread_1_1thread_1_1id.html">id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5">get_id</a> () const </td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the thread ID of a thread object. <br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">native_handle_type </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">native_handle</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the native handle for this thread. <a href="#ac9ba019ced75a29c52c41aff4e1ca20e"></a><br/></td></tr>
|
||||
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
|
||||
Static Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">static unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d">hardware_concurrency</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine the number of threads which can possibly execute concurrently. <a href="#a3b04fb20012111681e37dfe63f105f6d"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Thread class. </p>
|
||||
<hr/><h2>Constructor & Destructor Documentation</h2>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Thread class. </p>
|
||||
</div><hr/><h2>Constructor & Destructor Documentation</h2>
|
||||
<a class="anchor" id="a1816c2a63c2941090f9a24e5a62efea1"></a><!-- doxytag: member="tthread::thread::thread" ref="a1816c2a63c2941090f9a24e5a62efea1" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -69,8 +96,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classtthread_1_1thread.html">thread</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -89,19 +115,19 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classtthread_1_1thread.html">thread</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void(*)(void *) </td>
|
||||
<td class="paramname"> <em>aFunction</em>, </td>
|
||||
<td class="paramtype">void(*)(void *) </td>
|
||||
<td class="paramname"><em>aFunction</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"> <em>aArg</em></td><td> </td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"><em>aArg</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td><td></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -110,9 +136,9 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<p>Thread starting constructor. </p>
|
||||
<p>Construct a <code>thread</code> object with a new thread of execution. </p>
|
||||
<dl><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>aFunction</em> </td><td>A function pointer to a function of type: <code>void fun(void * arg)</code> </td></tr>
|
||||
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>aArg</em> </td><td>Argument to the thread function. </td></tr>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">aFunction</td><td>A function pointer to a function of type: <code>void fun(void * arg)</code> </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">aArg</td><td>Argument to the thread function. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -127,8 +153,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname">~<a class="el" href="classtthread_1_1thread.html">thread</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -141,6 +166,25 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
</div>
|
||||
</div>
|
||||
<hr/><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" id="ac295bade8aee589f6718dfa79edc2a34"></a><!-- doxytag: member="tthread::thread::detach" ref="ac295bade8aee589f6718dfa79edc2a34" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void detach </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Detach from the thread. </p>
|
||||
<p>After calling <code><a class="el" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34" title="Detach from the thread.">detach()</a></code>, the thread object is no longer assicated with a thread of execution (i.e. it is not joinable). The thread continues execution without the calling thread blocking, and when the thread ends execution, any owned resources are released. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a3b04fb20012111681e37dfe63f105f6d"></a><!-- doxytag: member="tthread::thread::hardware_concurrency" ref="a3b04fb20012111681e37dfe63f105f6d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -148,8 +192,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname">static unsigned hardware_concurrency </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [static]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -161,6 +204,25 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of hardware thread contexts in the system. </dd></dl>
|
||||
<dl class="note"><dt><b>Note:</b></dt><dd>If this value is not defined, the function returns zero (0). </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a6c7abfff648dad193674fc432ad4840d"></a><!-- doxytag: member="tthread::thread::join" ref="a6c7abfff648dad193674fc432ad4840d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void join </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Wait for the thread to finish (join execution flows). </p>
|
||||
<p>After calling <code><a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d" title="Wait for the thread to finish (join execution flows).">join()</a></code>, the thread object is no longer associated with a thread of execution (i.e. it is not joinable, and you may not join with it nor detach from it). </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a5f02386ef3b6ef614321b6ec3606b242"></a><!-- doxytag: member="tthread::thread::joinable" ref="a5f02386ef3b6ef614321b6ec3606b242" args="() const " -->
|
||||
@@ -170,8 +232,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname">bool joinable </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -190,8 +251,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr>
|
||||
<td class="memname">native_handle_type native_handle </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -207,8 +267,8 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
57
dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id-members.html
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<!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++: Member List</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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread.html">thread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">thread::id Member List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
This is the complete list of members for <a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a>()</td><td><a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a></td><td><code> [inline]</code></td></tr>
|
||||
</table></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,48 +2,71 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: id Class Reference</title>
|
||||
<title>TinyThread++: thread::id Class 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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="classtthread_1_1thread.html">thread</a>::<a class="el" href="classtthread_1_1thread_1_1id.html">id</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread.html">thread</a> </li>
|
||||
<li class="navelem"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">thread::id Class Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>id Class Reference</h1><!-- doxytag: class="tthread::thread::id" -->
|
||||
<!-- doxytag: class="tthread::thread::id" -->
|
||||
<p>Thread ID.
|
||||
<a href="#_details">More...</a></p>
|
||||
<a href="classtthread_1_1thread_1_1id.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="tinythread_8h_source.html">tinythread.h</a>></code></p>
|
||||
|
||||
<p><a href="classtthread_1_1thread_1_1id-members.html">List of all members.</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a087060b582403885d08e89ad894ecc5d"></a><br/></td></tr>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a087060b582403885d08e89ad894ecc5d"></a><br/></td></tr>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Thread ID. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Thread ID. </p>
|
||||
<p>The thread ID is a unique identifier for each thread. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5" title="Return the thread ID of a thread object.">thread::get_id()</a> </dd></dl>
|
||||
<hr/><h2>Constructor & Destructor Documentation</h2>
|
||||
</div><hr/><h2>Constructor & Destructor Documentation</h2>
|
||||
<a class="anchor" id="a087060b582403885d08e89ad894ecc5d"></a><!-- doxytag: member="tthread::thread::id::id" ref="a087060b582403885d08e89ad894ecc5d" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -51,8 +74,7 @@
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classtthread_1_1thread_1_1id.html">id</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -68,8 +90,8 @@
|
||||
<li><a class="el" href="tinythread_8h_source.html">tinythread.h</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
dependencies/sources/TinyThread++-1.1/doc/html/closed.png
vendored
Normal file
|
After Width: | Height: | Size: 126 B |
@@ -8,10 +8,15 @@ body, table, div, p, dl {
|
||||
/* @group Heading Levels */
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
@@ -64,8 +69,8 @@ h3.version {
|
||||
}
|
||||
|
||||
div.qindex, div.navtab{
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
@@ -83,13 +88,13 @@ div.navtab {
|
||||
/* @group Link Styling */
|
||||
|
||||
a {
|
||||
color: #153788;
|
||||
color: #3D578C;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.contents a:visited {
|
||||
color: #1b77c5;
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
@@ -102,9 +107,9 @@ a.qindex {
|
||||
|
||||
a.qindexHL {
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
background-color: #9CAFD4;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
border: 1px double #869DCA;
|
||||
}
|
||||
|
||||
.contents a.qindexHL:visited {
|
||||
@@ -119,11 +124,11 @@ a.elRef {
|
||||
}
|
||||
|
||||
a.code {
|
||||
color: #3030f0;
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a.codeRef {
|
||||
color: #3030f0;
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
@@ -138,8 +143,8 @@ dl.el {
|
||||
}
|
||||
|
||||
pre.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #C4CFE5;
|
||||
background-color: #FBFCFD;
|
||||
padding: 4px 6px;
|
||||
margin: 4px 8px 4px 2px;
|
||||
overflow: auto;
|
||||
@@ -153,13 +158,22 @@ div.ah {
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px
|
||||
margin-top: 3px;
|
||||
padding: 0.2em;
|
||||
border: solid thin #333;
|
||||
border-radius: 0.5em;
|
||||
-webkit-border-radius: .5em;
|
||||
-moz-border-radius: .5em;
|
||||
box-shadow: 2px 2px 3px #999;
|
||||
-webkit-box-shadow: 2px 2px 3px #999;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
|
||||
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
|
||||
}
|
||||
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -171,27 +185,32 @@ div.groupText {
|
||||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.contents {
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
td.indexkey {
|
||||
background-color: #e8eef2;
|
||||
background-color: #EBEFF6;
|
||||
font-weight: bold;
|
||||
border: 1px solid #CCCCCC;
|
||||
border: 1px solid #C4CFE5;
|
||||
margin: 2px 0px 2px 0;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
td.indexvalue {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #C4CFE5;
|
||||
padding: 2px 10px;
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
||||
tr.memlist {
|
||||
background-color: #f0f0f0;
|
||||
background-color: #EEF1F7;
|
||||
}
|
||||
|
||||
p.formulaDsp {
|
||||
@@ -217,6 +236,11 @@ div.center img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
img.footer {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
@@ -270,6 +294,7 @@ span.vhdllogic {
|
||||
|
||||
/* @end */
|
||||
|
||||
/*
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
@@ -286,6 +311,7 @@ input.search {
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
*/
|
||||
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
@@ -294,18 +320,18 @@ td.tiny {
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #84b0c7;
|
||||
border: 1px solid #A3B4D7;
|
||||
}
|
||||
|
||||
th.dirtab {
|
||||
background: #e8eef2;
|
||||
background: #EBEFF6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border: none;
|
||||
border-top: 1px solid #666;
|
||||
border-top: 1px solid #4A6AAA;
|
||||
}
|
||||
|
||||
hr.footer {
|
||||
@@ -314,10 +340,15 @@ hr.footer {
|
||||
|
||||
/* @group Member Descriptions */
|
||||
|
||||
table.memberdecls {
|
||||
border-spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight,
|
||||
.memItemLeft, .memItemRight,
|
||||
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
|
||||
background-color: #FAFAFA;
|
||||
background-color: #F9FAFC;
|
||||
border: none;
|
||||
margin: 4px;
|
||||
padding: 1px 0 0 8px;
|
||||
@@ -329,15 +360,19 @@ hr.footer {
|
||||
}
|
||||
|
||||
.memItemLeft, .memItemRight, .memTemplParams {
|
||||
border-top: 1px solid #ccc;
|
||||
border-top: 1px solid #C4CFE5;
|
||||
}
|
||||
|
||||
.memItemLeft, .memTemplItemLeft {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.memItemRight {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
color: #606060;
|
||||
color: #4665A2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -349,23 +384,28 @@ hr.footer {
|
||||
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #606060;
|
||||
color: #4665A2;
|
||||
font-weight: normal;
|
||||
margin-left: 3px;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.memnav {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.mempage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memitem {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.memname {
|
||||
@@ -375,40 +415,52 @@ hr.footer {
|
||||
}
|
||||
|
||||
.memproto {
|
||||
border-top: 1px solid #84b0c7;
|
||||
border-left: 1px solid #84b0c7;
|
||||
border-right: 1px solid #84b0c7;
|
||||
padding: 0;
|
||||
background-color: #d5e1e8;
|
||||
border-top: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 6px 0px 6px 0px;
|
||||
color: #253555;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
/* opera specific markup */
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
border-top-right-radius: 8px;
|
||||
border-top-left-radius: 8px;
|
||||
/* firefox specific markup */
|
||||
background-image: -moz-linear-gradient(rgba(228, 233, 245, 1.0) 0%, rgba(193, 205, 232, 1.0) 100%);
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
-moz-border-radius-topright: 8px;
|
||||
-moz-border-radius-topleft: 8px;
|
||||
/* webkit specific markup */
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(228, 233, 245, 1.0)), to(rgba(193, 205, 232, 1.0)));
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-webkit-border-top-right-radius: 8px;
|
||||
-webkit-border-top-left-radius: 8px;
|
||||
background-image:url('nav_f.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
|
||||
}
|
||||
|
||||
.memdoc {
|
||||
border-bottom: 1px solid #84b0c7;
|
||||
border-left: 1px solid #84b0c7;
|
||||
border-right: 1px solid #84b0c7;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 2px 5px;
|
||||
background-color: #eef3f5;
|
||||
background-color: #FBFCFD;
|
||||
border-top-width: 0;
|
||||
/* opera specific markup */
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
/* firefox specific markup */
|
||||
-moz-border-radius-bottomleft: 8px;
|
||||
-moz-border-radius-bottomright: 8px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
|
||||
/* webkit specific markup */
|
||||
-webkit-border-bottom-left-radius: 8px;
|
||||
-webkit-border-bottom-right-radius: 8px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
|
||||
}
|
||||
|
||||
.paramkey {
|
||||
@@ -427,6 +479,28 @@ hr.footer {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.params, .retval, .exception, .tparams {
|
||||
border-spacing: 6px 2px;
|
||||
}
|
||||
|
||||
.params .paramname, .retval .paramname {
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramtype {
|
||||
font-style: italic;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramdir {
|
||||
font-family: "courier new",courier,monospace;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Directory (tree) */
|
||||
@@ -435,7 +509,7 @@ hr.footer {
|
||||
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin: 0.5em;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* these are for tree view when used as main index */
|
||||
@@ -443,6 +517,7 @@ hr.footer {
|
||||
.directory {
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.directory h3 {
|
||||
@@ -520,9 +595,13 @@ proper pixel height of your image.
|
||||
|
||||
/* @end */
|
||||
|
||||
div.dynheader {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: #333;
|
||||
color: #2A3D61;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
@@ -530,12 +609,12 @@ table.doxtable {
|
||||
}
|
||||
|
||||
table.doxtable td, table.doxtable th {
|
||||
border: 1px solid #153788;
|
||||
border: 1px solid #2D4068;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.doxtable th {
|
||||
background-color: #254798;
|
||||
background-color: #374F7F;
|
||||
color: #FFFFFF;
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
@@ -543,3 +622,214 @@ table.doxtable th {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.tabsearch {
|
||||
top: 0px;
|
||||
left: 10px;
|
||||
height: 36px;
|
||||
background-image: url('tab_b.png');
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.navpath ul
|
||||
{
|
||||
font-size: 11px;
|
||||
background-image:url('tab_b.png');
|
||||
background-repeat:repeat-x;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
color:#8AA0CC;
|
||||
border:solid 1px #C2CDE4;
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
.navpath li
|
||||
{
|
||||
list-style-type:none;
|
||||
float:left;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:url('bc_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
}
|
||||
|
||||
.navpath li.navelem a
|
||||
{
|
||||
height:32px;
|
||||
display:block;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.navpath li.navelem a:hover
|
||||
{
|
||||
color:#6884BD;
|
||||
}
|
||||
|
||||
.navpath li.footer
|
||||
{
|
||||
list-style-type:none;
|
||||
float:right;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:none;
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
|
||||
div.summary
|
||||
{
|
||||
float: right;
|
||||
font-size: 8pt;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.summary a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.ingroups
|
||||
{
|
||||
font-size: 8pt;
|
||||
padding-left: 5px;
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.ingroups a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.header
|
||||
{
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid #C4CFE5;
|
||||
}
|
||||
|
||||
div.headertitle
|
||||
{
|
||||
padding: 5px 5px 5px 10px;
|
||||
}
|
||||
|
||||
dl
|
||||
{
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
|
||||
{
|
||||
border-left:4px solid;
|
||||
padding: 0 0 0 6px;
|
||||
}
|
||||
|
||||
dl.note
|
||||
{
|
||||
border-color: #D0C000;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention
|
||||
{
|
||||
border-color: #FF0000;
|
||||
}
|
||||
|
||||
dl.pre, dl.post, dl.invariant
|
||||
{
|
||||
border-color: #00D000;
|
||||
}
|
||||
|
||||
dl.deprecated
|
||||
{
|
||||
border-color: #505050;
|
||||
}
|
||||
|
||||
dl.todo
|
||||
{
|
||||
border-color: #00C0E0;
|
||||
}
|
||||
|
||||
dl.test
|
||||
{
|
||||
border-color: #3030E0;
|
||||
}
|
||||
|
||||
dl.bug
|
||||
{
|
||||
border-color: #C08050;
|
||||
}
|
||||
|
||||
#projectlogo
|
||||
{
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
#projectlogo img
|
||||
{
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
#projectname
|
||||
{
|
||||
font: 300% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
#projectbrief
|
||||
{
|
||||
font: 120% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectnumber
|
||||
{
|
||||
font: 50% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#titlearea
|
||||
{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #5373B4;
|
||||
}
|
||||
|
||||
.image
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dotgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mscgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.caption
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
BIN
dependencies/sources/TinyThread++-1.1/doc/html/doxygen.png
vendored
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
68
dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h.html
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
<!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++: fast_mutex.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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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 id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<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="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">fast_mutex.h File Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include <pthread.h></code><br/>
|
||||
</div>
|
||||
<p><a href="fast__mutex_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
||||
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_1fast__mutex.html">fast_mutex</a></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast mutex class. <a href="classtthread_1_1fast__mutex.html#details">More...</a><br/></td></tr>
|
||||
<tr><td colspan="2"><h2><a name="namespaces"></a>
|
||||
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>
|
||||
</table>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"></div></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,24 +7,40 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>fast_mutex.h</h1><a href="fast__mutex_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||||
<a name="l00002"></a>00002 <span class="comment">Copyright (c) 2010 Marcus Geelnard</span>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">fast_mutex.h</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<a href="fast__mutex_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-</span>
|
||||
<a name="l00002"></a>00002 <span class="comment">Copyright (c) 2010-2012 Marcus Geelnard</span>
|
||||
<a name="l00003"></a>00003 <span class="comment"></span>
|
||||
<a name="l00004"></a>00004 <span class="comment">This software is provided 'as-is', without any express or implied</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">warranty. In no event will the authors be held liable for any damages</span>
|
||||
@@ -71,167 +87,177 @@
|
||||
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00048"></a>00048 <span class="preprocessor"></span>
|
||||
<a name="l00049"></a>00049 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor"> #include <windows.h></span>
|
||||
<a name="l00051"></a>00051 <span class="preprocessor">#else</span>
|
||||
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #ifdef _FAST_MUTEX_ASM_</span>
|
||||
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor"> #include <sched.h></span>
|
||||
<a name="l00054"></a>00054 <span class="preprocessor"> #else</span>
|
||||
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor"> #include <pthread.h></span>
|
||||
<a name="l00056"></a>00056 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00058"></a>00058 <span class="preprocessor"></span>
|
||||
<a name="l00059"></a><a class="code" href="namespacetthread.html">00059</a> <span class="keyword">namespace </span>tthread {
|
||||
<a name="l00060"></a>00060
|
||||
<a name="l00080"></a><a class="code" href="classtthread_1_1fast__mutex.html">00080</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1fast__mutex.html" title="Fast mutex class.">fast_mutex</a> {
|
||||
<a name="l00081"></a>00081 <span class="keyword">public</span>:
|
||||
<a name="l00083"></a>00083 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00084"></a>00084 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8" title="Constructor.">fast_mutex</a>() : mLock(0) {}
|
||||
<a name="l00085"></a>00085 <span class="preprocessor">#else</span>
|
||||
<a name="l00086"></a><a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">00086</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8" title="Constructor.">fast_mutex</a>()
|
||||
<a name="l00087"></a>00087 {
|
||||
<a name="l00088"></a>00088 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00089"></a>00089 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00090"></a>00090 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00091"></a>00091 <span class="preprocessor"></span> pthread_mutex_init(&mHandle, NULL);
|
||||
<a name="l00092"></a>00092 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00093"></a>00093 <span class="preprocessor"></span> }
|
||||
<a name="l00094"></a>00094 <span class="preprocessor">#endif</span>
|
||||
<a name="l00095"></a>00095 <span class="preprocessor"></span>
|
||||
<a name="l00096"></a>00096 <span class="preprocessor">#if !defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00097"></a>00097 <span class="preprocessor"></span>
|
||||
<a name="l00098"></a><a class="code" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7">00098</a> <a class="code" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7" title="Destructor.">~fast_mutex</a>()
|
||||
<a name="l00099"></a>00099 {
|
||||
<a name="l00100"></a>00100 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00101"></a>00101 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00102"></a>00102 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00103"></a>00103 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00104"></a>00104 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00105"></a>00105 <span class="preprocessor"></span> }
|
||||
<a name="l00106"></a>00106 <span class="preprocessor">#endif</span>
|
||||
<a name="l00107"></a>00107 <span class="preprocessor"></span>
|
||||
<a name="l00112"></a><a class="code" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">00112</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00113"></a>00113 {
|
||||
<a name="l00114"></a>00114 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00115"></a>00115 <span class="preprocessor"></span> <span class="keywordtype">bool</span> gotLock;
|
||||
<a name="l00116"></a>00116 <span class="keywordflow">do</span> {
|
||||
<a name="l00117"></a>00117 gotLock = <a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>();
|
||||
<a name="l00118"></a>00118 <span class="keywordflow">if</span>(!gotLock)
|
||||
<a name="l00119"></a>00119 {
|
||||
<a name="l00120"></a>00120 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00121"></a>00121 <span class="preprocessor"></span> Sleep(0);
|
||||
<a name="l00122"></a>00122 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00123"></a>00123 <span class="preprocessor"></span> sched_yield();
|
||||
<a name="l00124"></a>00124 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00125"></a>00125 <span class="preprocessor"></span> }
|
||||
<a name="l00126"></a>00126 } <span class="keywordflow">while</span>(!gotLock);
|
||||
<a name="l00127"></a>00127 <span class="preprocessor">#else</span>
|
||||
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00129"></a>00129 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor"> #ifndef WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor"> #define WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #define __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor"> #include <windows.h></span>
|
||||
<a name="l00055"></a>00055 <span class="preprocessor"> #ifdef __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor"> #undef WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor"> #undef __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor"> #ifdef _FAST_MUTEX_ASM_</span>
|
||||
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor"> #include <sched.h></span>
|
||||
<a name="l00062"></a>00062 <span class="preprocessor"> #else</span>
|
||||
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #include <pthread.h></span>
|
||||
<a name="l00064"></a>00064 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00066"></a>00066 <span class="preprocessor"></span>
|
||||
<a name="l00067"></a><a class="code" href="namespacetthread.html">00067</a> <span class="keyword">namespace </span>tthread {
|
||||
<a name="l00068"></a>00068
|
||||
<a name="l00088"></a><a class="code" href="classtthread_1_1fast__mutex.html">00088</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1fast__mutex.html" title="Fast mutex class.">fast_mutex</a> {
|
||||
<a name="l00089"></a>00089 <span class="keyword">public</span>:
|
||||
<a name="l00091"></a>00091 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00092"></a>00092 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8" title="Constructor.">fast_mutex</a>() : mLock(0) {}
|
||||
<a name="l00093"></a>00093 <span class="preprocessor">#else</span>
|
||||
<a name="l00094"></a><a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">00094</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8" title="Constructor.">fast_mutex</a>()
|
||||
<a name="l00095"></a>00095 {
|
||||
<a name="l00096"></a>00096 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00097"></a>00097 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00098"></a>00098 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00099"></a>00099 <span class="preprocessor"></span> pthread_mutex_init(&mHandle, NULL);
|
||||
<a name="l00100"></a>00100 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00101"></a>00101 <span class="preprocessor"></span> }
|
||||
<a name="l00102"></a>00102 <span class="preprocessor">#endif</span>
|
||||
<a name="l00103"></a>00103 <span class="preprocessor"></span>
|
||||
<a name="l00104"></a>00104 <span class="preprocessor">#if !defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00105"></a>00105 <span class="preprocessor"></span>
|
||||
<a name="l00106"></a><a class="code" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7">00106</a> <a class="code" href="classtthread_1_1fast__mutex.html#a5eea296c19289a40d7b76df35ecf72a7" title="Destructor.">~fast_mutex</a>()
|
||||
<a name="l00107"></a>00107 {
|
||||
<a name="l00108"></a>00108 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00109"></a>00109 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00110"></a>00110 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00111"></a>00111 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00112"></a>00112 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00113"></a>00113 <span class="preprocessor"></span> }
|
||||
<a name="l00114"></a>00114 <span class="preprocessor">#endif</span>
|
||||
<a name="l00115"></a>00115 <span class="preprocessor"></span>
|
||||
<a name="l00120"></a><a class="code" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">00120</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00121"></a>00121 {
|
||||
<a name="l00122"></a>00122 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00123"></a>00123 <span class="preprocessor"></span> <span class="keywordtype">bool</span> gotLock;
|
||||
<a name="l00124"></a>00124 <span class="keywordflow">do</span> {
|
||||
<a name="l00125"></a>00125 gotLock = <a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>();
|
||||
<a name="l00126"></a>00126 <span class="keywordflow">if</span>(!gotLock)
|
||||
<a name="l00127"></a>00127 {
|
||||
<a name="l00128"></a>00128 <span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00129"></a>00129 <span class="preprocessor"></span> Sleep(0);
|
||||
<a name="l00130"></a>00130 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00131"></a>00131 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00131"></a>00131 <span class="preprocessor"></span> sched_yield();
|
||||
<a name="l00132"></a>00132 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00134"></a>00134 <span class="preprocessor"></span> }
|
||||
<a name="l00135"></a>00135
|
||||
<a name="l00141"></a><a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6">00141</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00142"></a>00142 {
|
||||
<a name="l00143"></a>00143 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00144"></a>00144 <span class="preprocessor"></span> <span class="keywordtype">int</span> oldLock;
|
||||
<a name="l00145"></a>00145 <span class="preprocessor"> #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))</span>
|
||||
<a name="l00146"></a>00146 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00147"></a>00147 <span class="stringliteral">"movl $1,%%eax\n\t"</span>
|
||||
<a name="l00148"></a>00148 <span class="stringliteral">"xchg %%eax,%0\n\t"</span>
|
||||
<a name="l00149"></a>00149 <span class="stringliteral">"movl %%eax,%1\n\t"</span>
|
||||
<a name="l00150"></a>00150 : <span class="stringliteral">"=m"</span> (mLock), <span class="stringliteral">"=m"</span> (oldLock)
|
||||
<a name="l00151"></a>00151 :
|
||||
<a name="l00152"></a>00152 : <span class="stringliteral">"%eax"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00153"></a>00153 );
|
||||
<a name="l00154"></a>00154 <span class="preprocessor"> #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))</span>
|
||||
<a name="l00155"></a>00155 <span class="preprocessor"></span> <span class="keywordtype">int</span> *ptrLock = &mLock;
|
||||
<a name="l00156"></a>00156 __asm {
|
||||
<a name="l00157"></a>00157 mov eax,1
|
||||
<a name="l00158"></a>00158 mov ecx,ptrLock
|
||||
<a name="l00159"></a>00159 xchg eax,[ecx]
|
||||
<a name="l00160"></a>00160 mov oldLock,eax
|
||||
<a name="l00161"></a>00161 }
|
||||
<a name="l00162"></a>00162 <span class="preprocessor"> #elif defined(__GNUC__) && (defined(__ppc__))</span>
|
||||
<a name="l00163"></a>00163 <span class="preprocessor"></span> <span class="keywordtype">int</span> newLock = 1;
|
||||
<a name="l00164"></a>00164 <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00165"></a>00165 <span class="stringliteral">"\n1:\n\t"</span>
|
||||
<a name="l00166"></a>00166 <span class="stringliteral">"lwarx %0,0,%1\n\t"</span>
|
||||
<a name="l00167"></a>00167 <span class="stringliteral">"cmpwi 0,%0,0\n\t"</span>
|
||||
<a name="l00168"></a>00168 <span class="stringliteral">"bne- 2f\n\t"</span>
|
||||
<a name="l00169"></a>00169 <span class="stringliteral">"stwcx. %2,0,%1\n\t"</span>
|
||||
<a name="l00170"></a>00170 <span class="stringliteral">"bne- 1b\n\t"</span>
|
||||
<a name="l00171"></a>00171 <span class="stringliteral">"isync\n"</span>
|
||||
<a name="l00172"></a>00172 <span class="stringliteral">"2:\n\t"</span>
|
||||
<a name="l00173"></a>00173 : <span class="stringliteral">"=&r"</span> (oldLock)
|
||||
<a name="l00174"></a>00174 : <span class="stringliteral">"r"</span> (&mLock), <span class="stringliteral">"r"</span> (newLock)
|
||||
<a name="l00175"></a>00175 : <span class="stringliteral">"cr0"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00176"></a>00176 );
|
||||
<a name="l00177"></a>00177 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00178"></a>00178 <span class="preprocessor"></span> <span class="keywordflow">return</span> (oldLock == 0);
|
||||
<a name="l00179"></a>00179 <span class="preprocessor">#else</span>
|
||||
<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00181"></a>00181 <span class="preprocessor"></span> <span class="keywordflow">return</span> TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00182"></a>00182 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00183"></a>00183 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00184"></a>00184 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00186"></a>00186 <span class="preprocessor"></span> }
|
||||
<a name="l00187"></a>00187
|
||||
<a name="l00191"></a><a class="code" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">00191</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00192"></a>00192 {
|
||||
<a name="l00193"></a>00193 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor"> #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))</span>
|
||||
<a name="l00195"></a>00195 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00196"></a>00196 <span class="stringliteral">"movl $0,%%eax\n\t"</span>
|
||||
<a name="l00197"></a>00197 <span class="stringliteral">"xchg %%eax,%0\n\t"</span>
|
||||
<a name="l00198"></a>00198 : <span class="stringliteral">"=m"</span> (mLock)
|
||||
<a name="l00199"></a>00199 :
|
||||
<a name="l00200"></a>00200 : <span class="stringliteral">"%eax"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00201"></a>00201 );
|
||||
<a name="l00202"></a>00202 <span class="preprocessor"> #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))</span>
|
||||
<a name="l00203"></a>00203 <span class="preprocessor"></span> <span class="keywordtype">int</span> *ptrLock = &mLock;
|
||||
<a name="l00204"></a>00204 __asm {
|
||||
<a name="l00205"></a>00205 mov eax,0
|
||||
<a name="l00206"></a>00206 mov ecx,ptrLock
|
||||
<a name="l00207"></a>00207 xchg eax,[ecx]
|
||||
<a name="l00208"></a>00208 }
|
||||
<a name="l00209"></a>00209 <span class="preprocessor"> #elif defined(__GNUC__) && (defined(__ppc__))</span>
|
||||
<a name="l00210"></a>00210 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00211"></a>00211 <span class="stringliteral">"sync\n\t"</span> <span class="comment">// Replace with lwsync where possible?</span>
|
||||
<a name="l00212"></a>00212 : : : <span class="stringliteral">"memory"</span>
|
||||
<a name="l00213"></a>00213 );
|
||||
<a name="l00214"></a>00214 mLock = 0;
|
||||
<a name="l00215"></a>00215 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00218"></a>00218 <span class="preprocessor"></span> LeaveCriticalSection(&mHandle);
|
||||
<a name="l00219"></a>00219 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00220"></a>00220 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00221"></a>00221 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00223"></a>00223 <span class="preprocessor"></span> }
|
||||
<a name="l00224"></a>00224
|
||||
<a name="l00225"></a>00225 <span class="keyword">private</span>:
|
||||
<a name="l00226"></a>00226 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00227"></a>00227 <span class="preprocessor"></span> <span class="keywordtype">int</span> mLock;
|
||||
<a name="l00228"></a>00228 <span class="preprocessor">#else</span>
|
||||
<a name="l00229"></a>00229 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00230"></a>00230 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00231"></a>00231 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00232"></a>00232 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00233"></a>00233 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00234"></a>00234 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00235"></a>00235 <span class="preprocessor"></span>};
|
||||
<a name="l00236"></a>00236
|
||||
<a name="l00237"></a>00237 }
|
||||
<a name="l00238"></a>00238
|
||||
<a name="l00239"></a>00239 <span class="preprocessor">#endif // _FAST_MUTEX_H_</span>
|
||||
<a name="l00133"></a>00133 <span class="preprocessor"></span> }
|
||||
<a name="l00134"></a>00134 } <span class="keywordflow">while</span>(!gotLock);
|
||||
<a name="l00135"></a>00135 <span class="preprocessor">#else</span>
|
||||
<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00137"></a>00137 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00138"></a>00138 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00139"></a>00139 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00140"></a>00140 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00142"></a>00142 <span class="preprocessor"></span> }
|
||||
<a name="l00143"></a>00143
|
||||
<a name="l00149"></a><a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6">00149</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1fast__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00150"></a>00150 {
|
||||
<a name="l00151"></a>00151 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00152"></a>00152 <span class="preprocessor"></span> <span class="keywordtype">int</span> oldLock;
|
||||
<a name="l00153"></a>00153 <span class="preprocessor"> #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))</span>
|
||||
<a name="l00154"></a>00154 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00155"></a>00155 <span class="stringliteral">"movl $1,%%eax\n\t"</span>
|
||||
<a name="l00156"></a>00156 <span class="stringliteral">"xchg %%eax,%0\n\t"</span>
|
||||
<a name="l00157"></a>00157 <span class="stringliteral">"movl %%eax,%1\n\t"</span>
|
||||
<a name="l00158"></a>00158 : <span class="stringliteral">"=m"</span> (mLock), <span class="stringliteral">"=m"</span> (oldLock)
|
||||
<a name="l00159"></a>00159 :
|
||||
<a name="l00160"></a>00160 : <span class="stringliteral">"%eax"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00161"></a>00161 );
|
||||
<a name="l00162"></a>00162 <span class="preprocessor"> #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))</span>
|
||||
<a name="l00163"></a>00163 <span class="preprocessor"></span> <span class="keywordtype">int</span> *ptrLock = &mLock;
|
||||
<a name="l00164"></a>00164 __asm {
|
||||
<a name="l00165"></a>00165 mov eax,1
|
||||
<a name="l00166"></a>00166 mov ecx,ptrLock
|
||||
<a name="l00167"></a>00167 xchg eax,[ecx]
|
||||
<a name="l00168"></a>00168 mov oldLock,eax
|
||||
<a name="l00169"></a>00169 }
|
||||
<a name="l00170"></a>00170 <span class="preprocessor"> #elif defined(__GNUC__) && (defined(__ppc__))</span>
|
||||
<a name="l00171"></a>00171 <span class="preprocessor"></span> <span class="keywordtype">int</span> newLock = 1;
|
||||
<a name="l00172"></a>00172 <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00173"></a>00173 <span class="stringliteral">"\n1:\n\t"</span>
|
||||
<a name="l00174"></a>00174 <span class="stringliteral">"lwarx %0,0,%1\n\t"</span>
|
||||
<a name="l00175"></a>00175 <span class="stringliteral">"cmpwi 0,%0,0\n\t"</span>
|
||||
<a name="l00176"></a>00176 <span class="stringliteral">"bne- 2f\n\t"</span>
|
||||
<a name="l00177"></a>00177 <span class="stringliteral">"stwcx. %2,0,%1\n\t"</span>
|
||||
<a name="l00178"></a>00178 <span class="stringliteral">"bne- 1b\n\t"</span>
|
||||
<a name="l00179"></a>00179 <span class="stringliteral">"isync\n"</span>
|
||||
<a name="l00180"></a>00180 <span class="stringliteral">"2:\n\t"</span>
|
||||
<a name="l00181"></a>00181 : <span class="stringliteral">"=&r"</span> (oldLock)
|
||||
<a name="l00182"></a>00182 : <span class="stringliteral">"r"</span> (&mLock), <span class="stringliteral">"r"</span> (newLock)
|
||||
<a name="l00183"></a>00183 : <span class="stringliteral">"cr0"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00184"></a>00184 );
|
||||
<a name="l00185"></a>00185 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00186"></a>00186 <span class="preprocessor"></span> <span class="keywordflow">return</span> (oldLock == 0);
|
||||
<a name="l00187"></a>00187 <span class="preprocessor">#else</span>
|
||||
<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00189"></a>00189 <span class="preprocessor"></span> <span class="keywordflow">return</span> TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00190"></a>00190 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00191"></a>00191 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00192"></a>00192 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00193"></a>00193 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00194"></a>00194 <span class="preprocessor"></span> }
|
||||
<a name="l00195"></a>00195
|
||||
<a name="l00199"></a><a class="code" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">00199</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00200"></a>00200 {
|
||||
<a name="l00201"></a>00201 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00202"></a>00202 <span class="preprocessor"></span><span class="preprocessor"> #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))</span>
|
||||
<a name="l00203"></a>00203 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00204"></a>00204 <span class="stringliteral">"movl $0,%%eax\n\t"</span>
|
||||
<a name="l00205"></a>00205 <span class="stringliteral">"xchg %%eax,%0\n\t"</span>
|
||||
<a name="l00206"></a>00206 : <span class="stringliteral">"=m"</span> (mLock)
|
||||
<a name="l00207"></a>00207 :
|
||||
<a name="l00208"></a>00208 : <span class="stringliteral">"%eax"</span>, <span class="stringliteral">"memory"</span>
|
||||
<a name="l00209"></a>00209 );
|
||||
<a name="l00210"></a>00210 <span class="preprocessor"> #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))</span>
|
||||
<a name="l00211"></a>00211 <span class="preprocessor"></span> <span class="keywordtype">int</span> *ptrLock = &mLock;
|
||||
<a name="l00212"></a>00212 __asm {
|
||||
<a name="l00213"></a>00213 mov eax,0
|
||||
<a name="l00214"></a>00214 mov ecx,ptrLock
|
||||
<a name="l00215"></a>00215 xchg eax,[ecx]
|
||||
<a name="l00216"></a>00216 }
|
||||
<a name="l00217"></a>00217 <span class="preprocessor"> #elif defined(__GNUC__) && (defined(__ppc__))</span>
|
||||
<a name="l00218"></a>00218 <span class="preprocessor"></span> <span class="keyword">asm</span> <span class="keyword">volatile</span> (
|
||||
<a name="l00219"></a>00219 <span class="stringliteral">"sync\n\t"</span> <span class="comment">// Replace with lwsync where possible?</span>
|
||||
<a name="l00220"></a>00220 : : : <span class="stringliteral">"memory"</span>
|
||||
<a name="l00221"></a>00221 );
|
||||
<a name="l00222"></a>00222 mLock = 0;
|
||||
<a name="l00223"></a>00223 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00224"></a>00224 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00225"></a>00225 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00226"></a>00226 <span class="preprocessor"></span> LeaveCriticalSection(&mHandle);
|
||||
<a name="l00227"></a>00227 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00228"></a>00228 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00229"></a>00229 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00230"></a>00230 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00231"></a>00231 <span class="preprocessor"></span> }
|
||||
<a name="l00232"></a>00232
|
||||
<a name="l00233"></a>00233 <span class="keyword">private</span>:
|
||||
<a name="l00234"></a>00234 <span class="preprocessor">#if defined(_FAST_MUTEX_ASM_)</span>
|
||||
<a name="l00235"></a>00235 <span class="preprocessor"></span> <span class="keywordtype">int</span> mLock;
|
||||
<a name="l00236"></a>00236 <span class="preprocessor">#else</span>
|
||||
<a name="l00237"></a>00237 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00238"></a>00238 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00239"></a>00239 <span class="preprocessor"> #elif defined(_TTHREAD_POSIX_)</span>
|
||||
<a name="l00240"></a>00240 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00241"></a>00241 <span class="preprocessor"> #endif</span>
|
||||
<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00243"></a>00243 <span class="preprocessor"></span>};
|
||||
<a name="l00244"></a>00244
|
||||
<a name="l00245"></a>00245 }
|
||||
<a name="l00246"></a>00246
|
||||
<a name="l00247"></a>00247 <span class="preprocessor">#endif // _FAST_MUTEX_H_</span>
|
||||
<a name="l00248"></a>00248 <span class="preprocessor"></span>
|
||||
</pre></div></div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
</div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,36 +2,51 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: File Index</title>
|
||||
<title>TinyThread++: File List</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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 class="current"><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><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="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">File List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>File List</h1>Here is a list of all documented files with brief descriptions:<table>
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><table>
|
||||
<tr><td class="indexkey"><a class="el" href="fast__mutex_8h.html">fast_mutex.h</a> <a href="fast__mutex_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="tinythread_8h.html">tinythread.h</a> <a href="tinythread_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,30 +7,41 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="functions.html"><span>All</span></a></li>
|
||||
<li><a href="functions_func.html"><span>Functions</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_c"><span>c</span></a></li>
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_f"><span>f</span></a></li>
|
||||
@@ -45,14 +56,14 @@
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_u"><span>u</span></a></li>
|
||||
<li><a href="#index_w"><span>w</span></a></li>
|
||||
<li><a href="#index_~"><span>~</span></a></li>
|
||||
<li><a href="#index_0x7e"><span>~</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
Here is a list of all documented class members with links to the class documentation for each member:
|
||||
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div>
|
||||
|
||||
<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
||||
<li>condition_variable()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">condition_variable</a>
|
||||
</li>
|
||||
@@ -62,42 +73,45 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>detach()
|
||||
: <a class="el" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34">thread</a>
|
||||
</li>
|
||||
<li>duration()
|
||||
: <a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration< _Rep, _Period ></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
|
||||
<li>fast_mutex()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">fast_mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
|
||||
<li>get_id()
|
||||
: <a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5">thread</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
||||
<li>hardware_concurrency()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d">thread</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>id()
|
||||
: <a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a>
|
||||
: <a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">thread::id</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_j">- j -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_j"></a>- j -</h3><ul>
|
||||
<li>join()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d">thread</a>
|
||||
</li>
|
||||
@@ -107,7 +121,7 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
|
||||
<li>lock()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">fast_mutex</a>
|
||||
, <a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">mutex</a>
|
||||
@@ -119,14 +133,14 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>mutex()
|
||||
: <a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
|
||||
<li>native_handle()
|
||||
: <a class="el" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">thread</a>
|
||||
</li>
|
||||
@@ -139,14 +153,14 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>recursive_mutex()
|
||||
: <a class="el" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">recursive_mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>thread()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">thread</a>
|
||||
</li>
|
||||
@@ -158,7 +172,7 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_u">- u -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
||||
<li>unlock()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">fast_mutex</a>
|
||||
, <a class="el" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">recursive_mutex</a>
|
||||
@@ -167,14 +181,14 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_w">- w -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
||||
<li>wait()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">condition_variable</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_0x7e">- ~ -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_0x7e"></a>- ~ -</h3><ul>
|
||||
<li>~condition_variable()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">condition_variable</a>
|
||||
</li>
|
||||
@@ -195,8 +209,8 @@ Here is a list of all documented class members with links to the class documenta
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,30 +7,41 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="functions.html"><span>All</span></a></li>
|
||||
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_c"><span>c</span></a></li>
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_f"><span>f</span></a></li>
|
||||
@@ -45,14 +56,14 @@
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_u"><span>u</span></a></li>
|
||||
<li><a href="#index_w"><span>w</span></a></li>
|
||||
<li><a href="#index_~"><span>~</span></a></li>
|
||||
<li><a href="#index_0x7e"><span>~</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
|
||||
 
|
||||
|
||||
<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
||||
<li>condition_variable()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">condition_variable</a>
|
||||
</li>
|
||||
@@ -62,42 +73,45 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>detach()
|
||||
: <a class="el" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34">thread</a>
|
||||
</li>
|
||||
<li>duration()
|
||||
: <a class="el" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">duration< _Rep, _Period ></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
|
||||
<li>fast_mutex()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#aed9ff6c4d30b4fe2775a15c6778d96f8">fast_mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
|
||||
<li>get_id()
|
||||
: <a class="el" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5">thread</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
||||
<li>hardware_concurrency()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d">thread</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>id()
|
||||
: <a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">id</a>
|
||||
: <a class="el" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">thread::id</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_j">- j -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_j"></a>- j -</h3><ul>
|
||||
<li>join()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d">thread</a>
|
||||
</li>
|
||||
@@ -107,7 +121,7 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
|
||||
<li>lock()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#aa81aed607133209dade63a226818224d">fast_mutex</a>
|
||||
, <a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">mutex</a>
|
||||
@@ -119,14 +133,14 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>mutex()
|
||||
: <a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
|
||||
<li>native_handle()
|
||||
: <a class="el" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">thread</a>
|
||||
</li>
|
||||
@@ -139,14 +153,14 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>recursive_mutex()
|
||||
: <a class="el" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">recursive_mutex</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>thread()
|
||||
: <a class="el" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">thread</a>
|
||||
</li>
|
||||
@@ -158,7 +172,7 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_u">- u -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
||||
<li>unlock()
|
||||
: <a class="el" href="classtthread_1_1fast__mutex.html#a9278be8203e1c42e2619179882ae4403">fast_mutex</a>
|
||||
, <a class="el" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">recursive_mutex</a>
|
||||
@@ -167,14 +181,14 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_w">- w -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
||||
<li>wait()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">condition_variable</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_0x7e">- ~ -</a></h3><ul>
|
||||
<h3><a class="anchor" id="index_0x7e"></a>- ~ -</h3><ul>
|
||||
<li>~condition_variable()
|
||||
: <a class="el" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">condition_variable</a>
|
||||
</li>
|
||||
@@ -195,8 +209,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,36 +2,47 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Class Members</title>
|
||||
<title>TinyThread++: File Members</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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 class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="globals.html"><span>All</span></a></li>
|
||||
<li><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
Here is a list of all documented file members with links to the documentation:<ul>
|
||||
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div><ul>
|
||||
<li>thread_local
|
||||
: <a class="el" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">tinythread.h</a>
|
||||
</li>
|
||||
@@ -46,8 +57,8 @@ Here is a list of all documented file members with links to the documentation:<u
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,36 +2,47 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Class Members</title>
|
||||
<title>TinyThread++: File Members</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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 class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="globals.html"><span>All</span></a></li>
|
||||
<li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<ul>
|
||||
 <ul>
|
||||
<li>thread_local
|
||||
: <a class="el" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">tinythread.h</a>
|
||||
</li>
|
||||
@@ -46,8 +57,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,28 +7,43 @@
|
||||
<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 class="current"><a href="index.html"><span>Main Page</span></a></li>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li class="current"><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><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">TinyThread++ API Reference </div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>TinyThread++ API Reference </h1><h3 class="version">1.0 </h3><h2><a class="anchor" id="intro_sec">
|
||||
Introduction</a></h2>
|
||||
<div class="textblock"><h2><a class="anchor" id="intro_sec"></a>
|
||||
Introduction</h2>
|
||||
<p>TinyThread++ is a minimal, portable implementation of basic threading classes for C++.</p>
|
||||
<p>They closely mimic the functionality and naming of the C++0x standard, and should be easily replaceable with the corresponding std:: variants.</p>
|
||||
<h2><a class="anchor" id="port_sec">
|
||||
Portability</a></h2>
|
||||
<p>They closely mimic the functionality and naming of the C++11 standard, and should be easily replaceable with the corresponding std:: variants.</p>
|
||||
<h2><a class="anchor" id="port_sec"></a>
|
||||
Portability</h2>
|
||||
<p>The Win32 variant uses the native Win32 API for implementing the thread classes, while for other systems, the POSIX threads API (pthread) is used.</p>
|
||||
<h2><a class="anchor" id="class_sec">
|
||||
Classes</a></h2>
|
||||
<p>In order to mimic the threading API of the C++0x standard, subsets of several classes are provided. The fundamental classes are: </p>
|
||||
<h2><a class="anchor" id="class_sec"></a>
|
||||
Classes</h2>
|
||||
<p>In order to mimic the threading API of the C++11 standard, subsets of several classes are provided. The fundamental classes are: </p>
|
||||
<ul>
|
||||
<li><a class="el" href="classtthread_1_1thread.html" title="Thread class.">tthread::thread</a> </li>
|
||||
<li><a class="el" href="classtthread_1_1mutex.html" title="Mutex class.">tthread::mutex</a> </li>
|
||||
@@ -37,13 +52,13 @@ Classes</a></h2>
|
||||
<li><a class="el" href="classtthread_1_1lock__guard.html" title="Lock guard class.">tthread::lock_guard</a> </li>
|
||||
<li><a class="el" href="classtthread_1_1fast__mutex.html" title="Fast mutex class.">tthread::fast_mutex</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="misc_sec">
|
||||
Miscellaneous</a></h2>
|
||||
<h2><a class="anchor" id="misc_sec"></a>
|
||||
Miscellaneous</h2>
|
||||
<p>The following special keywords are available: <a class="el" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e" title="Thread local storage keyword.">thread_local</a>.</p>
|
||||
<p>For more detailed information (including additional classes), browse the different sections of this documentation. A good place to start is: <a class="el" href="tinythread_8h.html">tinythread.h</a>. </p>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
</div></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,29 +2,40 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Class Members</title>
|
||||
<title>TinyThread++: Namespace Members</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="namespacemembers.html"><span>All</span></a></li>
|
||||
<li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
|
||||
<li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
|
||||
@@ -32,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
Here is a list of all documented namespace members with links to the namespaces they belong to:<ul>
|
||||
<div class="textblock">Here is a list of all documented namespace members with links to the namespaces they belong to:</div><ul>
|
||||
<li>get_id()
|
||||
: <a class="el" href="namespacetthread_1_1this__thread.html#ab9370620a3920b9ec550f84fb44fb032">tthread::this_thread</a>
|
||||
</li>
|
||||
@@ -62,8 +73,8 @@ Here is a list of all documented namespace members with links to the namespaces
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,29 +2,40 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Class Members</title>
|
||||
<title>TinyThread++: Namespace Members</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespacemembers.html"><span>All</span></a></li>
|
||||
<li class="current"><a href="namespacemembers_func.html"><span>Functions</span></a></li>
|
||||
<li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
|
||||
@@ -32,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<ul>
|
||||
 <ul>
|
||||
<li>get_id()
|
||||
: <a class="el" href="namespacetthread_1_1this__thread.html#ab9370620a3920b9ec550f84fb44fb032">tthread::this_thread</a>
|
||||
</li>
|
||||
@@ -44,8 +55,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,29 +2,40 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Class Members</title>
|
||||
<title>TinyThread++: Namespace Members</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespacemembers.html"><span>All</span></a></li>
|
||||
<li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
|
||||
<li class="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
|
||||
@@ -32,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<ul>
|
||||
 <ul>
|
||||
<li>hours
|
||||
: <a class="el" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf">tthread::chrono</a>
|
||||
</li>
|
||||
@@ -53,8 +64,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,37 +2,52 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>TinyThread++: Namespace Index</title>
|
||||
<title>TinyThread++: Namespace List</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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Namespace List</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>Namespace List</h1>Here is a list of all documented namespaces with brief descriptions:<table>
|
||||
<div class="textblock">Here is a list of all documented namespaces with brief descriptions:</div><table>
|
||||
<tr><td class="indexkey"><a class="el" href="namespacetthread.html">tthread</a></td><td class="indexvalue">Main name space for TinyThread++ </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="namespacetthread_1_1chrono.html">tthread::chrono</a></td><td class="indexvalue">Minimal implementation of the <code>chrono</code> namespace </td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="namespacetthread_1_1this__thread.html">tthread::this_thread</a></td><td class="indexvalue">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 </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:33 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
87
dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread.html
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
<!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++: tthread Namespace 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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">tthread Namespace Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
|
||||
<p>Main name space for TinyThread++.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetthread_1_1chrono.html">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">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><a name="nested-classes"></a>
|
||||
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_1fast__mutex.html">fast_mutex</a></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast mutex class. <a href="classtthread_1_1fast__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_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</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_1ratio.html">ratio</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>
|
||||
</table>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Main name space for TinyThread++. </p>
|
||||
<p>This namespace is more or less equivalent to the <code>std</code> namespace for the C++11 thread classes. For instance, the <a class="el" href="classtthread_1_1mutex.html" title="Mutex class.">tthread::mutex</a> class corresponds to the std::mutex class. </p>
|
||||
</div></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,64 +7,88 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="namespacetthread_1_1chrono.html">chrono</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread_1_1chrono.html">chrono</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#typedef-members">Typedefs</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">tthread::chrono Namespace Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>tthread::chrono Namespace Reference</h1>
|
||||
|
||||
<p>Minimal implementation of the <code>chrono</code> namespace.
|
||||
<a href="#_details">More...</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_1chrono_1_1duration.html">duration</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>Typedefs</h2></td></tr>
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
||||
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_1chrono_1_1duration.html">duration</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><a name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1396eccd0048d613bae0a745b55fa624"></a><!-- doxytag: member="tthread::chrono::nanoseconds" ref="a1396eccd0048d613bae0a745b55fa624" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __intmax_t, <br class="typebreak"/>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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="tthread::chrono::microseconds" ref="add152055d7a764f3c1e5af1710f8814f" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __intmax_t, <br class="typebreak"/>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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="tthread::chrono::milliseconds" ref="a2cf88065d403d0e61022510769380b75" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __intmax_t, <br class="typebreak"/>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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="tthread::chrono::seconds" ref="a302ea2e096592e90ec58ccdcc6ec42c3" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __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>
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __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="tthread::chrono::minutes" ref="a2a9e93851a6aee0eb47cc6379287ee16" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __intmax_t, <br class="typebreak"/>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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="tthread::chrono::hours" ref="af212c337748be0da79f5a3a509f36cdf" args="" -->
|
||||
typedef <a class="el" href="classtthread_1_1chrono_1_1duration.html">duration</a>< __intmax_t, <br class="typebreak"/>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
<a class="el" href="classtthread_1_1ratio.html">ratio</a>< 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>
|
||||
</table>
|
||||
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<p>Minimal implementation of the <code>chrono</code> namespace. </p>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><p>Minimal implementation of the <code>chrono</code> namespace. </p>
|
||||
<p>The <code>chrono</code> namespace provides types for specifying time intervals. </p>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
</div></div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,43 +7,65 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
||||
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navpath"><a class="el" href="namespacetthread.html">tthread</a>::<a class="el" href="namespacetthread_1_1this__thread.html">this_thread</a>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetthread.html">tthread</a> </li>
|
||||
<li class="navelem"><a class="el" href="namespacetthread_1_1this__thread.html">this_thread</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">tthread::this_thread Namespace Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>tthread::this_thread Namespace Reference</h1>
|
||||
|
||||
<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.
|
||||
<a href="#_details">More...</a></p>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td colspan="2"><h2>Functions</h2></td></tr>
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9370620a3920b9ec550f84fb44fb032"></a><!-- doxytag: member="tthread::this_thread::get_id" ref="ab9370620a3920b9ec550f84fb44fb032" args="()" -->
|
||||
<a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a> </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>
|
||||
<a class="el" href="classtthread_1_1thread_1_1id.html">thread::id</a> </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 <a class="el" href="classtthread_1_1chrono_1_1duration.html">chrono::duration</a>< _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>
|
||||
<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 <a class="el" href="classtthread_1_1chrono_1_1duration.html">chrono::duration</a>< _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>
|
||||
<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>
|
||||
<hr/><h2>Function Documentation</h2>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"><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>
|
||||
</div><hr/><h2>Function Documentation</h2>
|
||||
<a class="anchor" id="acba48c6dbf12d38ab816c18c1ef96398"></a><!-- doxytag: member="tthread::this_thread::sleep_for" ref="acba48c6dbf12d38ab816c18c1ef96398" args="(const chrono::duration< _Rep, _Period > &aTime)" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -51,10 +73,9 @@
|
||||
<tr>
|
||||
<td class="memname">void tthread::this_thread::sleep_for </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const chrono::duration< _Rep, _Period > & </td>
|
||||
<td class="paramname"> <em>aTime</em></td>
|
||||
<td> ) </td>
|
||||
<td><code> [inline]</code></td>
|
||||
<td class="paramtype">const chrono::duration< _Rep, _Period > & </td>
|
||||
<td class="paramname"><em>aTime</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -62,9 +83,8 @@
|
||||
|
||||
<p>Blocks the calling thread for a period of time. </p>
|
||||
<dl><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>aTime</em> </td><td>Minimum time to put the thread to sleep. Example usage: </p>
|
||||
<div class="fragment"><pre class="fragment"> <span class="comment">// Sleep for 100 milliseconds</span>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">aTime</td><td>Minimum time to put the thread to sleep. Example usage: <div class="fragment"><pre class="fragment"> <span class="comment">// Sleep for 100 milliseconds</span>
|
||||
<a class="code" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398" title="Blocks the calling thread for a period of time.">this_thread::sleep_for</a>(<a class="code" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75" title="Duration with the unit milliseconds.">chrono::milliseconds</a>(100));
|
||||
</pre></div> </td></tr>
|
||||
</table>
|
||||
@@ -81,8 +101,7 @@
|
||||
<tr>
|
||||
<td class="memname">void tthread::this_thread::yield </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td>
|
||||
<td> ) </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -95,8 +114,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Oct 1 21:49:34 2010 for TinyThread++ by
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
dependencies/sources/TinyThread++-1.1/doc/html/nav_f.png
vendored
Normal file
|
After Width: | Height: | Size: 159 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/nav_h.png
vendored
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/open.png
vendored
Normal file
|
After Width: | Height: | Size: 118 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/tab_a.png
vendored
Normal file
|
After Width: | Height: | Size: 140 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/tab_b.png
vendored
Normal file
|
After Width: | Height: | Size: 178 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/tab_h.png
vendored
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
dependencies/sources/TinyThread++-1.1/doc/html/tab_s.png
vendored
Normal file
|
After Width: | Height: | Size: 189 B |
59
dependencies/sources/TinyThread++-1.1/doc/html/tabs.css
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
.tabs, .tabs2, .tabs3 {
|
||||
background-image: url('tab_b.png');
|
||||
width: 100%;
|
||||
z-index: 101;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tabs2 {
|
||||
font-size: 10px;
|
||||
}
|
||||
.tabs3 {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.tablist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.tablist li {
|
||||
float: left;
|
||||
display: table-cell;
|
||||
background-image: url('tab_b.png');
|
||||
line-height: 36px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tablist a {
|
||||
display: block;
|
||||
padding: 0 20px;
|
||||
font-weight: bold;
|
||||
background-image:url('tab_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color: #283A5D;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tabs3 .tablist a {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.tablist a:hover {
|
||||
background-image: url('tab_h.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tablist li.current a {
|
||||
background-image: url('tab_a.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
}
|
||||
@@ -7,113 +7,139 @@
|
||||
<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>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<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="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#define-members">Defines</a> |
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">tinythread.h File Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>tinythread.h File Reference</h1><code>#include <pthread.h></code><br/>
|
||||
<div class="textblock"><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/>
|
||||
|
||||
</div>
|
||||
<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>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
||||
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">thread::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><a name="namespaces"></a>
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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 colspan="2"><h2><a name="define-members"></a>
|
||||
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>
|
||||
#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>
|
||||
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="tinythread_8h.html#a9248a2e6daaeb43e46bd632417cb4733">TINYTHREAD_VERSION_MINOR</a>   1</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>
|
||||
#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><a name="typedef-members"></a>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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><a name="func-members"></a>
|
||||
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>
|
||||
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>
|
||||
<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>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock"></div><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">
|
||||
@@ -129,15 +155,15 @@ thread::id </td><td class="memItemRight" valign="bottom"><a class="el" href
|
||||
<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>
|
||||
</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++11 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++11 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
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 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>
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
544
dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h_source.html
vendored
Normal file
@@ -0,0 +1,544 @@
|
||||
<!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 Source File</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.7.4 -->
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyThread++ <span id="projectnumber">1.1</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<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 id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<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 class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">tinythread.h</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<a href="tinythread_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-</span>
|
||||
<a name="l00002"></a>00002 <span class="comment">Copyright (c) 2010-2012 Marcus Geelnard</span>
|
||||
<a name="l00003"></a>00003 <span class="comment"></span>
|
||||
<a name="l00004"></a>00004 <span class="comment">This software is provided 'as-is', without any express or implied</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">warranty. In no event will the authors be held liable for any damages</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">arising from the use of this software.</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"></span>
|
||||
<a name="l00008"></a>00008 <span class="comment">Permission is granted to anyone to use this software for any purpose,</span>
|
||||
<a name="l00009"></a>00009 <span class="comment">including commercial applications, and to alter it and redistribute it</span>
|
||||
<a name="l00010"></a>00010 <span class="comment">freely, subject to the following restrictions:</span>
|
||||
<a name="l00011"></a>00011 <span class="comment"></span>
|
||||
<a name="l00012"></a>00012 <span class="comment"> 1. The origin of this software must not be misrepresented; you must not</span>
|
||||
<a name="l00013"></a>00013 <span class="comment"> claim that you wrote the original software. If you use this software</span>
|
||||
<a name="l00014"></a>00014 <span class="comment"> in a product, an acknowledgment in the product documentation would be</span>
|
||||
<a name="l00015"></a>00015 <span class="comment"> appreciated but is not required.</span>
|
||||
<a name="l00016"></a>00016 <span class="comment"></span>
|
||||
<a name="l00017"></a>00017 <span class="comment"> 2. Altered source versions must be plainly marked as such, and must not be</span>
|
||||
<a name="l00018"></a>00018 <span class="comment"> misrepresented as being the original software.</span>
|
||||
<a name="l00019"></a>00019 <span class="comment"></span>
|
||||
<a name="l00020"></a>00020 <span class="comment"> 3. This notice may not be removed or altered from any source</span>
|
||||
<a name="l00021"></a>00021 <span class="comment"> distribution.</span>
|
||||
<a name="l00022"></a>00022 <span class="comment">*/</span>
|
||||
<a name="l00023"></a>00023
|
||||
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef _TINYTHREAD_H_</span>
|
||||
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define _TINYTHREAD_H_</span>
|
||||
<a name="l00026"></a>00026 <span class="preprocessor"></span>
|
||||
<a name="l00057"></a>00057
|
||||
<a name="l00058"></a>00058 <span class="comment">// Which platform are we on?</span>
|
||||
<a name="l00059"></a>00059 <span class="preprocessor">#if !defined(_TTHREAD_PLATFORM_DEFINED_)</span>
|
||||
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)</span>
|
||||
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_WIN32_</span>
|
||||
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
|
||||
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_POSIX_</span>
|
||||
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_PLATFORM_DEFINED_</span>
|
||||
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00067"></a>00067 <span class="preprocessor"></span>
|
||||
<a name="l00068"></a>00068 <span class="comment">// Platform specific includes</span>
|
||||
<a name="l00069"></a>00069 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor"> #ifndef WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"> #define WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"> #define __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor"> #include <windows.h></span>
|
||||
<a name="l00075"></a>00075 <span class="preprocessor"> #ifdef __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor"> #undef WIN32_LEAN_AND_MEAN</span>
|
||||
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"> #undef __UNDEF_LEAN_AND_MEAN</span>
|
||||
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor"> #include <pthread.h></span>
|
||||
<a name="l00081"></a>00081 <span class="preprocessor"> #include <signal.h></span>
|
||||
<a name="l00082"></a>00082 <span class="preprocessor"> #include <sched.h></span>
|
||||
<a name="l00083"></a>00083 <span class="preprocessor"> #include <unistd.h></span>
|
||||
<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
|
||||
<a name="l00085"></a>00085 <span class="preprocessor"></span>
|
||||
<a name="l00086"></a>00086 <span class="comment">// Generic includes</span>
|
||||
<a name="l00087"></a>00087 <span class="preprocessor">#include <ostream></span>
|
||||
<a name="l00088"></a>00088
|
||||
<a name="l00090"></a><a class="code" href="tinythread_8h.html#af1d2d7842598b143f8e0a54a9b6f5bec">00090</a> <span class="preprocessor">#define TINYTHREAD_VERSION_MAJOR 1</span>
|
||||
<a name="l00091"></a>00091 <span class="preprocessor"></span>
|
||||
<a name="l00092"></a><a class="code" href="tinythread_8h.html#a9248a2e6daaeb43e46bd632417cb4733">00092</a> <span class="preprocessor">#define TINYTHREAD_VERSION_MINOR 1</span>
|
||||
<a name="l00093"></a>00093 <span class="preprocessor"></span>
|
||||
<a name="l00094"></a><a class="code" href="tinythread_8h.html#a9a3d5a9159f22201a37dd59d82b1861f">00094</a> <span class="preprocessor">#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)</span>
|
||||
<a name="l00095"></a>00095 <span class="preprocessor"></span>
|
||||
<a name="l00096"></a>00096 <span class="comment">// Do we have a fully featured C++11 compiler?</span>
|
||||
<a name="l00097"></a>00097 <span class="preprocessor">#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L))</span>
|
||||
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_CPP11_</span>
|
||||
<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00100"></a>00100 <span class="preprocessor"></span>
|
||||
<a name="l00101"></a>00101 <span class="comment">// ...at least partial C++11?</span>
|
||||
<a name="l00102"></a>00102 <span class="preprocessor">#if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)</span>
|
||||
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_CPP11_PARTIAL_</span>
|
||||
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00105"></a>00105 <span class="preprocessor"></span>
|
||||
<a name="l00106"></a>00106 <span class="comment">// Macro for disabling assignments of objects.</span>
|
||||
<a name="l00107"></a>00107 <span class="preprocessor">#ifdef _TTHREAD_CPP11_PARTIAL_</span>
|
||||
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_DISABLE_ASSIGNMENT(name) \</span>
|
||||
<a name="l00109"></a>00109 <span class="preprocessor"> name(const name&) = delete; \</span>
|
||||
<a name="l00110"></a>00110 <span class="preprocessor"> name& operator=(const name&) = delete;</span>
|
||||
<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
||||
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor"> #define _TTHREAD_DISABLE_ASSIGNMENT(name) \</span>
|
||||
<a name="l00113"></a>00113 <span class="preprocessor"> name(const name&); \</span>
|
||||
<a name="l00114"></a>00114 <span class="preprocessor"> name& operator=(const name&);</span>
|
||||
<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00116"></a>00116 <span class="preprocessor"></span>
|
||||
<a name="l00137"></a>00137
|
||||
<a name="l00138"></a>00138 <span class="preprocessor">#if !defined(_TTHREAD_CPP11_) && !defined(thread_local)</span>
|
||||
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor"> #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)</span>
|
||||
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor"> #define thread_local __thread</span>
|
||||
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
|
||||
<a name="l00142"></a><a class="code" href="tinythread_8h.html#ad4d9b405bcbffaf0d4dae6166c18aa1e">00142</a> <span class="preprocessor"></span><span class="preprocessor"> #define thread_local __declspec(thread)</span>
|
||||
<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
|
||||
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||||
<a name="l00145"></a>00145 <span class="preprocessor"></span>
|
||||
<a name="l00146"></a>00146
|
||||
<a name="l00151"></a>00151 <span class="keyword">namespace </span>tthread {
|
||||
<a name="l00152"></a>00152
|
||||
<a name="l00159"></a><a class="code" href="classtthread_1_1mutex.html">00159</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a> {
|
||||
<a name="l00160"></a>00160 <span class="keyword">public</span>:
|
||||
<a name="l00162"></a><a class="code" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">00162</a> <a class="code" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910" title="Constructor.">mutex</a>()
|
||||
<a name="l00163"></a>00163 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00164"></a>00164 <span class="preprocessor"></span> : mAlreadyLocked(<span class="keyword">false</span>)
|
||||
<a name="l00165"></a>00165 <span class="preprocessor">#endif</span>
|
||||
<a name="l00166"></a>00166 <span class="preprocessor"></span> {
|
||||
<a name="l00167"></a>00167 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00168"></a>00168 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00169"></a>00169 <span class="preprocessor">#else</span>
|
||||
<a name="l00170"></a>00170 <span class="preprocessor"></span> pthread_mutex_init(&mHandle, NULL);
|
||||
<a name="l00171"></a>00171 <span class="preprocessor">#endif</span>
|
||||
<a name="l00172"></a>00172 <span class="preprocessor"></span> }
|
||||
<a name="l00173"></a>00173
|
||||
<a name="l00175"></a><a class="code" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">00175</a> <a class="code" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf" title="Destructor.">~mutex</a>()
|
||||
<a name="l00176"></a>00176 {
|
||||
<a name="l00177"></a>00177 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00178"></a>00178 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00179"></a>00179 <span class="preprocessor">#else</span>
|
||||
<a name="l00180"></a>00180 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00181"></a>00181 <span class="preprocessor">#endif</span>
|
||||
<a name="l00182"></a>00182 <span class="preprocessor"></span> }
|
||||
<a name="l00183"></a>00183
|
||||
<a name="l00188"></a><a class="code" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">00188</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00189"></a>00189 {
|
||||
<a name="l00190"></a>00190 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00191"></a>00191 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00192"></a>00192 <span class="keywordflow">while</span>(mAlreadyLocked) Sleep(1000); <span class="comment">// Simulate deadlock...</span>
|
||||
<a name="l00193"></a>00193 mAlreadyLocked = <span class="keyword">true</span>;
|
||||
<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
|
||||
<a name="l00195"></a>00195 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
|
||||
<a name="l00197"></a>00197 <span class="preprocessor"></span> }
|
||||
<a name="l00198"></a>00198
|
||||
<a name="l00204"></a><a class="code" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">00204</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00205"></a>00205 {
|
||||
<a name="l00206"></a>00206 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00207"></a>00207 <span class="preprocessor"></span> <span class="keywordtype">bool</span> ret = (TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>);
|
||||
<a name="l00208"></a>00208 <span class="keywordflow">if</span>(ret && mAlreadyLocked)
|
||||
<a name="l00209"></a>00209 {
|
||||
<a name="l00210"></a>00210 LeaveCriticalSection(&mHandle);
|
||||
<a name="l00211"></a>00211 ret = <span class="keyword">false</span>;
|
||||
<a name="l00212"></a>00212 }
|
||||
<a name="l00213"></a>00213 <span class="keywordflow">return</span> ret;
|
||||
<a name="l00214"></a>00214 <span class="preprocessor">#else</span>
|
||||
<a name="l00215"></a>00215 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00216"></a>00216 <span class="preprocessor">#endif</span>
|
||||
<a name="l00217"></a>00217 <span class="preprocessor"></span> }
|
||||
<a name="l00218"></a>00218
|
||||
<a name="l00222"></a><a class="code" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">00222</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00223"></a>00223 {
|
||||
<a name="l00224"></a>00224 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00225"></a>00225 <span class="preprocessor"></span> mAlreadyLocked = <span class="keyword">false</span>;
|
||||
<a name="l00226"></a>00226 LeaveCriticalSection(&mHandle);
|
||||
<a name="l00227"></a>00227 <span class="preprocessor">#else</span>
|
||||
<a name="l00228"></a>00228 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00229"></a>00229 <span class="preprocessor">#endif</span>
|
||||
<a name="l00230"></a>00230 <span class="preprocessor"></span> }
|
||||
<a name="l00231"></a>00231
|
||||
<a name="l00232"></a>00232 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a>)
|
||||
<a name="l00233"></a>00233
|
||||
<a name="l00234"></a>00234 private:
|
||||
<a name="l00235"></a>00235 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00236"></a>00236 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00237"></a>00237 <span class="keywordtype">bool</span> mAlreadyLocked;
|
||||
<a name="l00238"></a>00238 <span class="preprocessor">#else</span>
|
||||
<a name="l00239"></a>00239 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00240"></a>00240 <span class="preprocessor">#endif</span>
|
||||
<a name="l00241"></a>00241 <span class="preprocessor"></span>
|
||||
<a name="l00242"></a>00242 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>;
|
||||
<a name="l00243"></a>00243 };
|
||||
<a name="l00244"></a>00244
|
||||
<a name="l00251"></a><a class="code" href="classtthread_1_1recursive__mutex.html">00251</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1recursive__mutex.html" title="Recursive mutex class.">recursive_mutex</a> {
|
||||
<a name="l00252"></a>00252 <span class="keyword">public</span>:
|
||||
<a name="l00254"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede">00254</a> <a class="code" href="classtthread_1_1recursive__mutex.html#a612d33a8905a3de216a8be0467538ede" title="Constructor.">recursive_mutex</a>()
|
||||
<a name="l00255"></a>00255 {
|
||||
<a name="l00256"></a>00256 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00257"></a>00257 <span class="preprocessor"></span> InitializeCriticalSection(&mHandle);
|
||||
<a name="l00258"></a>00258 <span class="preprocessor">#else</span>
|
||||
<a name="l00259"></a>00259 <span class="preprocessor"></span> pthread_mutexattr_t attr;
|
||||
<a name="l00260"></a>00260 pthread_mutexattr_init(&attr);
|
||||
<a name="l00261"></a>00261 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
<a name="l00262"></a>00262 pthread_mutex_init(&mHandle, &attr);
|
||||
<a name="l00263"></a>00263 <span class="preprocessor">#endif</span>
|
||||
<a name="l00264"></a>00264 <span class="preprocessor"></span> }
|
||||
<a name="l00265"></a>00265
|
||||
<a name="l00267"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100">00267</a> <a class="code" href="classtthread_1_1recursive__mutex.html#a571b16a7b52c4d1fb0bdb5ff0482c100" title="Destructor.">~recursive_mutex</a>()
|
||||
<a name="l00268"></a>00268 {
|
||||
<a name="l00269"></a>00269 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00270"></a>00270 <span class="preprocessor"></span> DeleteCriticalSection(&mHandle);
|
||||
<a name="l00271"></a>00271 <span class="preprocessor">#else</span>
|
||||
<a name="l00272"></a>00272 <span class="preprocessor"></span> pthread_mutex_destroy(&mHandle);
|
||||
<a name="l00273"></a>00273 <span class="preprocessor">#endif</span>
|
||||
<a name="l00274"></a>00274 <span class="preprocessor"></span> }
|
||||
<a name="l00275"></a>00275
|
||||
<a name="l00280"></a><a class="code" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d">00280</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1recursive__mutex.html#aa81aed607133209dade63a226818224d" title="Lock the mutex.">lock</a>()
|
||||
<a name="l00281"></a>00281 {
|
||||
<a name="l00282"></a>00282 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00283"></a>00283 <span class="preprocessor"></span> EnterCriticalSection(&mHandle);
|
||||
<a name="l00284"></a>00284 <span class="preprocessor">#else</span>
|
||||
<a name="l00285"></a>00285 <span class="preprocessor"></span> pthread_mutex_lock(&mHandle);
|
||||
<a name="l00286"></a>00286 <span class="preprocessor">#endif</span>
|
||||
<a name="l00287"></a>00287 <span class="preprocessor"></span> }
|
||||
<a name="l00288"></a>00288
|
||||
<a name="l00294"></a><a class="code" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6">00294</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1recursive__mutex.html#aa24a64f788f142df670c3abc809d32b6" title="Try to lock the mutex.">try_lock</a>()
|
||||
<a name="l00295"></a>00295 {
|
||||
<a name="l00296"></a>00296 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00297"></a>00297 <span class="preprocessor"></span> <span class="keywordflow">return</span> TryEnterCriticalSection(&mHandle) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00298"></a>00298 <span class="preprocessor">#else</span>
|
||||
<a name="l00299"></a>00299 <span class="preprocessor"></span> <span class="keywordflow">return</span> (pthread_mutex_trylock(&mHandle) == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;
|
||||
<a name="l00300"></a>00300 <span class="preprocessor">#endif</span>
|
||||
<a name="l00301"></a>00301 <span class="preprocessor"></span> }
|
||||
<a name="l00302"></a>00302
|
||||
<a name="l00306"></a><a class="code" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403">00306</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1recursive__mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock</a>()
|
||||
<a name="l00307"></a>00307 {
|
||||
<a name="l00308"></a>00308 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00309"></a>00309 <span class="preprocessor"></span> LeaveCriticalSection(&mHandle);
|
||||
<a name="l00310"></a>00310 <span class="preprocessor">#else</span>
|
||||
<a name="l00311"></a>00311 <span class="preprocessor"></span> pthread_mutex_unlock(&mHandle);
|
||||
<a name="l00312"></a>00312 <span class="preprocessor">#endif</span>
|
||||
<a name="l00313"></a>00313 <span class="preprocessor"></span> }
|
||||
<a name="l00314"></a>00314
|
||||
<a name="l00315"></a>00315 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1recursive__mutex.html" title="Recursive mutex class.">recursive_mutex</a>)
|
||||
<a name="l00316"></a>00316
|
||||
<a name="l00317"></a>00317 private:
|
||||
<a name="l00318"></a>00318 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00319"></a>00319 <span class="preprocessor"></span> CRITICAL_SECTION mHandle;
|
||||
<a name="l00320"></a>00320 <span class="preprocessor">#else</span>
|
||||
<a name="l00321"></a>00321 <span class="preprocessor"></span> pthread_mutex_t mHandle;
|
||||
<a name="l00322"></a>00322 <span class="preprocessor">#endif</span>
|
||||
<a name="l00323"></a>00323 <span class="preprocessor"></span>
|
||||
<a name="l00324"></a>00324 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>;
|
||||
<a name="l00325"></a>00325 };
|
||||
<a name="l00326"></a>00326
|
||||
<a name="l00341"></a>00341
|
||||
<a name="l00342"></a>00342 <span class="keyword">template</span> <<span class="keyword">class</span> T>
|
||||
<a name="l00343"></a><a class="code" href="classtthread_1_1lock__guard.html">00343</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a> {
|
||||
<a name="l00344"></a>00344 <span class="keyword">public</span>:
|
||||
<a name="l00345"></a>00345 <span class="keyword">typedef</span> T mutex_type;
|
||||
<a name="l00346"></a>00346
|
||||
<a name="l00347"></a>00347 <a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a>() : mMutex(0) {}
|
||||
<a name="l00348"></a>00348
|
||||
<a name="l00350"></a><a class="code" href="classtthread_1_1lock__guard.html#a2c5fd14427acb035def5201e4cfd4540">00350</a> <span class="keyword">explicit</span> <a class="code" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a>(mutex_type &aMutex)
|
||||
<a name="l00351"></a>00351 {
|
||||
<a name="l00352"></a>00352 mMutex = &aMutex;
|
||||
<a name="l00353"></a>00353 mMutex->lock();
|
||||
<a name="l00354"></a>00354 }
|
||||
<a name="l00355"></a>00355
|
||||
<a name="l00357"></a><a class="code" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d">00357</a> <a class="code" href="classtthread_1_1lock__guard.html#aa54999fb933a139807d39ed05e97aa6d" title="The destructor unlocks the mutex.">~lock_guard</a>()
|
||||
<a name="l00358"></a>00358 {
|
||||
<a name="l00359"></a>00359 <span class="keywordflow">if</span>(mMutex)
|
||||
<a name="l00360"></a>00360 mMutex->unlock();
|
||||
<a name="l00361"></a>00361 }
|
||||
<a name="l00362"></a>00362
|
||||
<a name="l00363"></a>00363 <span class="keyword">private</span>:
|
||||
<a name="l00364"></a>00364 mutex_type * mMutex;
|
||||
<a name="l00365"></a>00365 };
|
||||
<a name="l00366"></a>00366
|
||||
<a name="l00392"></a><a class="code" href="classtthread_1_1condition__variable.html">00392</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a> {
|
||||
<a name="l00393"></a>00393 <span class="keyword">public</span>:
|
||||
<a name="l00395"></a>00395 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00396"></a>00396 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9" title="Constructor.">condition_variable</a>();
|
||||
<a name="l00397"></a>00397 <span class="preprocessor">#else</span>
|
||||
<a name="l00398"></a><a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9">00398</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a9e62a1d1145c820a02469a48099fdfa9" title="Constructor.">condition_variable</a>()
|
||||
<a name="l00399"></a>00399 {
|
||||
<a name="l00400"></a>00400 pthread_cond_init(&mHandle, NULL);
|
||||
<a name="l00401"></a>00401 }
|
||||
<a name="l00402"></a>00402 <span class="preprocessor">#endif</span>
|
||||
<a name="l00403"></a>00403 <span class="preprocessor"></span>
|
||||
<a name="l00405"></a>00405 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00406"></a>00406 <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b" title="Destructor.">~condition_variable</a>();
|
||||
<a name="l00407"></a>00407 <span class="preprocessor">#else</span>
|
||||
<a name="l00408"></a><a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b">00408</a> <span class="preprocessor"></span> <a class="code" href="classtthread_1_1condition__variable.html#a58df09046f5006d4170ae92717f1e50b" title="Destructor.">~condition_variable</a>()
|
||||
<a name="l00409"></a>00409 {
|
||||
<a name="l00410"></a>00410 pthread_cond_destroy(&mHandle);
|
||||
<a name="l00411"></a>00411 }
|
||||
<a name="l00412"></a>00412 <span class="preprocessor">#endif</span>
|
||||
<a name="l00413"></a>00413 <span class="preprocessor"></span>
|
||||
<a name="l00419"></a>00419 <span class="keyword">template</span> <<span class="keyword">class</span> _mutexT>
|
||||
<a name="l00420"></a><a class="code" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede">00420</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a4d877d804385bde4aacf2156e86faede" title="Wait for the condition.">wait</a>(_mutexT &aMutex)
|
||||
<a name="l00421"></a>00421 {
|
||||
<a name="l00422"></a>00422 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00423"></a>00423 <span class="preprocessor"></span> <span class="comment">// Increment number of waiters</span>
|
||||
<a name="l00424"></a>00424 EnterCriticalSection(&mWaitersCountLock);
|
||||
<a name="l00425"></a>00425 ++ mWaitersCount;
|
||||
<a name="l00426"></a>00426 LeaveCriticalSection(&mWaitersCountLock);
|
||||
<a name="l00427"></a>00427
|
||||
<a name="l00428"></a>00428 <span class="comment">// Release the mutex while waiting for the condition (will decrease</span>
|
||||
<a name="l00429"></a>00429 <span class="comment">// the number of waiters when done)...</span>
|
||||
<a name="l00430"></a>00430 aMutex.unlock();
|
||||
<a name="l00431"></a>00431 _wait();
|
||||
<a name="l00432"></a>00432 aMutex.lock();
|
||||
<a name="l00433"></a>00433 <span class="preprocessor">#else</span>
|
||||
<a name="l00434"></a>00434 <span class="preprocessor"></span> pthread_cond_wait(&mHandle, &aMutex.mHandle);
|
||||
<a name="l00435"></a>00435 <span class="preprocessor">#endif</span>
|
||||
<a name="l00436"></a>00436 <span class="preprocessor"></span> }
|
||||
<a name="l00437"></a>00437
|
||||
<a name="l00443"></a>00443 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00444"></a>00444 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394" title="Notify one thread that is waiting for the condition.">notify_one</a>();
|
||||
<a name="l00445"></a>00445 <span class="preprocessor">#else</span>
|
||||
<a name="l00446"></a><a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394">00446</a> <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#a84c2ec0dd971c593883198a323eeb394" title="Notify one thread that is waiting for the condition.">notify_one</a>()
|
||||
<a name="l00447"></a>00447 {
|
||||
<a name="l00448"></a>00448 pthread_cond_signal(&mHandle);
|
||||
<a name="l00449"></a>00449 }
|
||||
<a name="l00450"></a>00450 <span class="preprocessor">#endif</span>
|
||||
<a name="l00451"></a>00451 <span class="preprocessor"></span>
|
||||
<a name="l00457"></a>00457 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00458"></a>00458 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326" title="Notify all threads that are waiting for the condition.">notify_all</a>();
|
||||
<a name="l00459"></a>00459 <span class="preprocessor">#else</span>
|
||||
<a name="l00460"></a><a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326">00460</a> <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1condition__variable.html#ad35a04e61229c15c5211ebff00089326" title="Notify all threads that are waiting for the condition.">notify_all</a>()
|
||||
<a name="l00461"></a>00461 {
|
||||
<a name="l00462"></a>00462 pthread_cond_broadcast(&mHandle);
|
||||
<a name="l00463"></a>00463 }
|
||||
<a name="l00464"></a>00464 <span class="preprocessor">#endif</span>
|
||||
<a name="l00465"></a>00465 <span class="preprocessor"></span>
|
||||
<a name="l00466"></a>00466 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1condition__variable.html" title="Condition variable class.">condition_variable</a>)
|
||||
<a name="l00467"></a>00467
|
||||
<a name="l00468"></a>00468 private:
|
||||
<a name="l00469"></a>00469 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00470"></a>00470 <span class="preprocessor"></span> <span class="keywordtype">void</span> _wait();
|
||||
<a name="l00471"></a>00471 HANDLE mEvents[2];
|
||||
<a name="l00472"></a>00472 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mWaitersCount;
|
||||
<a name="l00473"></a>00473 CRITICAL_SECTION mWaitersCountLock;
|
||||
<a name="l00474"></a>00474 <span class="preprocessor">#else</span>
|
||||
<a name="l00475"></a>00475 <span class="preprocessor"></span> pthread_cond_t mHandle;
|
||||
<a name="l00476"></a>00476 <span class="preprocessor">#endif</span>
|
||||
<a name="l00477"></a>00477 <span class="preprocessor"></span>};
|
||||
<a name="l00478"></a>00478
|
||||
<a name="l00479"></a>00479
|
||||
<a name="l00481"></a><a class="code" href="classtthread_1_1thread.html">00481</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1thread.html" title="Thread class.">thread</a> {
|
||||
<a name="l00482"></a>00482 <span class="keyword">public</span>:
|
||||
<a name="l00483"></a>00483 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00484"></a>00484 <span class="preprocessor"></span> <span class="keyword">typedef</span> HANDLE native_handle_type;
|
||||
<a name="l00485"></a>00485 <span class="preprocessor">#else</span>
|
||||
<a name="l00486"></a>00486 <span class="preprocessor"></span> <span class="keyword">typedef</span> pthread_t native_handle_type;
|
||||
<a name="l00487"></a>00487 <span class="preprocessor">#endif</span>
|
||||
<a name="l00488"></a>00488 <span class="preprocessor"></span>
|
||||
<a name="l00489"></a>00489 <span class="keyword">class </span><a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">id</a>;
|
||||
<a name="l00490"></a>00490
|
||||
<a name="l00494"></a><a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1">00494</a> <a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1" title="Default constructor.">thread</a>() : mHandle(0), mNotAThread(true)
|
||||
<a name="l00495"></a>00495 #if defined(_TTHREAD_WIN32_)
|
||||
<a name="l00496"></a>00496 , mWin32ThreadID(0)
|
||||
<a name="l00497"></a>00497 #endif
|
||||
<a name="l00498"></a>00498 {}
|
||||
<a name="l00499"></a>00499
|
||||
<a name="l00508"></a>00508 <a class="code" href="classtthread_1_1thread.html#a1816c2a63c2941090f9a24e5a62efea1" title="Default constructor.">thread</a>(<span class="keywordtype">void</span> (*aFunction)(<span class="keywordtype">void</span> *), <span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00509"></a>00509
|
||||
<a name="l00514"></a>00514 <a class="code" href="classtthread_1_1thread.html#a626c04c85c7e2b10215bc4a35062f177" title="Destructor.">~thread</a>();
|
||||
<a name="l00515"></a>00515
|
||||
<a name="l00520"></a>00520 <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1thread.html#a6c7abfff648dad193674fc432ad4840d" title="Wait for the thread to finish (join execution flows).">join</a>();
|
||||
<a name="l00521"></a>00521
|
||||
<a name="l00524"></a>00524 <span class="keywordtype">bool</span> <a class="code" href="classtthread_1_1thread.html#a5f02386ef3b6ef614321b6ec3606b242" title="Check if the thread is joinable.">joinable</a>() <span class="keyword">const</span>;
|
||||
<a name="l00525"></a>00525
|
||||
<a name="l00531"></a>00531 <span class="keywordtype">void</span> <a class="code" href="classtthread_1_1thread.html#ac295bade8aee589f6718dfa79edc2a34" title="Detach from the thread.">detach</a>();
|
||||
<a name="l00532"></a>00532
|
||||
<a name="l00534"></a>00534 <span class="keywordtype">id</span> <a class="code" href="classtthread_1_1thread.html#afb4f4110b330d27774c16baec4f7d4f5" title="Return the thread ID of a thread object.">get_id</a>() <span class="keyword">const</span>;
|
||||
<a name="l00535"></a>00535
|
||||
<a name="l00539"></a><a class="code" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e">00539</a> <span class="keyword">inline</span> native_handle_type <a class="code" href="classtthread_1_1thread.html#ac9ba019ced75a29c52c41aff4e1ca20e" title="Get the native handle for this thread.">native_handle</a>()
|
||||
<a name="l00540"></a>00540 {
|
||||
<a name="l00541"></a>00541 <span class="keywordflow">return</span> mHandle;
|
||||
<a name="l00542"></a>00542 }
|
||||
<a name="l00543"></a>00543
|
||||
<a name="l00549"></a>00549 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <a class="code" href="classtthread_1_1thread.html#a3b04fb20012111681e37dfe63f105f6d" title="Determine the number of threads which can possibly execute concurrently.">hardware_concurrency</a>();
|
||||
<a name="l00550"></a>00550
|
||||
<a name="l00551"></a>00551 _TTHREAD_DISABLE_ASSIGNMENT(<a class="code" href="classtthread_1_1thread.html" title="Thread class.">thread</a>)
|
||||
<a name="l00552"></a>00552
|
||||
<a name="l00553"></a>00553 private:
|
||||
<a name="l00554"></a>00554 native_handle_type mHandle;
|
||||
<a name="l00555"></a>00555 mutable <a class="code" href="classtthread_1_1mutex.html" title="Mutex class.">mutex</a> mDataMutex;
|
||||
<a name="l00556"></a>00556 <span class="keywordtype">bool</span> mNotAThread;
|
||||
<a name="l00557"></a>00557 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00558"></a>00558 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mWin32ThreadID;
|
||||
<a name="l00559"></a>00559 <span class="preprocessor">#endif</span>
|
||||
<a name="l00560"></a>00560 <span class="preprocessor"></span>
|
||||
<a name="l00561"></a>00561 <span class="comment">// This is the internal thread wrapper function.</span>
|
||||
<a name="l00562"></a>00562 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00563"></a>00563 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> WINAPI wrapper_function(<span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00564"></a>00564 <span class="preprocessor">#else</span>
|
||||
<a name="l00565"></a>00565 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">void</span> * wrapper_function(<span class="keywordtype">void</span> * aArg);
|
||||
<a name="l00566"></a>00566 <span class="preprocessor">#endif</span>
|
||||
<a name="l00567"></a>00567 <span class="preprocessor"></span>};
|
||||
<a name="l00568"></a>00568
|
||||
<a name="l00572"></a><a class="code" href="classtthread_1_1thread_1_1id.html">00572</a> <span class="keyword">class </span><a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">thread::id</a> {
|
||||
<a name="l00573"></a>00573 <span class="keyword">public</span>:
|
||||
<a name="l00577"></a><a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d">00577</a> <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>() : mId(0) {};
|
||||
<a name="l00578"></a>00578
|
||||
<a name="l00579"></a>00579 <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> aId) : mId(aId) {};
|
||||
<a name="l00580"></a>00580
|
||||
<a name="l00581"></a>00581 <a class="code" href="classtthread_1_1thread_1_1id.html#a087060b582403885d08e89ad894ecc5d" title="Default constructor.">id</a>(<span class="keyword">const</span> <span class="keywordtype">id</span>& aId) : mId(aId.mId) {};
|
||||
<a name="l00582"></a>00582
|
||||
<a name="l00583"></a>00583 <span class="keyword">inline</span> <span class="keywordtype">id</span> & operator=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId)
|
||||
<a name="l00584"></a>00584 {
|
||||
<a name="l00585"></a>00585 mId = aId.mId;
|
||||
<a name="l00586"></a>00586 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
||||
<a name="l00587"></a>00587 }
|
||||
<a name="l00588"></a>00588
|
||||
<a name="l00589"></a>00589 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00590"></a>00590 {
|
||||
<a name="l00591"></a>00591 <span class="keywordflow">return</span> (aId1.mId == aId2.mId);
|
||||
<a name="l00592"></a>00592 }
|
||||
<a name="l00593"></a>00593
|
||||
<a name="l00594"></a>00594 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00595"></a>00595 {
|
||||
<a name="l00596"></a>00596 <span class="keywordflow">return</span> (aId1.mId != aId2.mId);
|
||||
<a name="l00597"></a>00597 }
|
||||
<a name="l00598"></a>00598
|
||||
<a name="l00599"></a>00599 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00600"></a>00600 {
|
||||
<a name="l00601"></a>00601 <span class="keywordflow">return</span> (aId1.mId <= aId2.mId);
|
||||
<a name="l00602"></a>00602 }
|
||||
<a name="l00603"></a>00603
|
||||
<a name="l00604"></a>00604 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00605"></a>00605 {
|
||||
<a name="l00606"></a>00606 <span class="keywordflow">return</span> (aId1.mId < aId2.mId);
|
||||
<a name="l00607"></a>00607 }
|
||||
<a name="l00608"></a>00608
|
||||
<a name="l00609"></a>00609 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>=(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00610"></a>00610 {
|
||||
<a name="l00611"></a>00611 <span class="keywordflow">return</span> (aId1.mId >= aId2.mId);
|
||||
<a name="l00612"></a>00612 }
|
||||
<a name="l00613"></a>00613
|
||||
<a name="l00614"></a>00614 <span class="keyword">inline</span> <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>(<span class="keyword">const</span> <span class="keywordtype">id</span> &aId1, <span class="keyword">const</span> <span class="keywordtype">id</span> &aId2)
|
||||
<a name="l00615"></a>00615 {
|
||||
<a name="l00616"></a>00616 <span class="keywordflow">return</span> (aId1.mId > aId2.mId);
|
||||
<a name="l00617"></a>00617 }
|
||||
<a name="l00618"></a>00618
|
||||
<a name="l00619"></a>00619 <span class="keyword">inline</span> <span class="keyword">friend</span> std::ostream& operator <<(std::ostream &os, <span class="keyword">const</span> <span class="keywordtype">id</span> &obj)
|
||||
<a name="l00620"></a>00620 {
|
||||
<a name="l00621"></a>00621 os << obj.mId;
|
||||
<a name="l00622"></a>00622 <span class="keywordflow">return</span> os;
|
||||
<a name="l00623"></a>00623 }
|
||||
<a name="l00624"></a>00624
|
||||
<a name="l00625"></a>00625 <span class="keyword">private</span>:
|
||||
<a name="l00626"></a>00626 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> mId;
|
||||
<a name="l00627"></a>00627 };
|
||||
<a name="l00628"></a>00628
|
||||
<a name="l00629"></a>00629
|
||||
<a name="l00630"></a>00630 <span class="comment">// Related to <ratio> - minimal to be able to support chrono.</span>
|
||||
<a name="l00631"></a>00631 <span class="keyword">typedef</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> __intmax_t;
|
||||
<a name="l00632"></a>00632
|
||||
<a name="l00635"></a><a class="code" href="classtthread_1_1ratio.html">00635</a> <span class="keyword">template</span> <__<span class="keywordtype">int</span>max_t N, __<span class="keywordtype">int</span>max_t D = 1> <span class="keyword">class </span><a class="code" href="classtthread_1_1ratio.html" title="Minimal implementation of the ratio class.">ratio</a> {
|
||||
<a name="l00636"></a>00636 <span class="keyword">public</span>:
|
||||
<a name="l00637"></a>00637 <span class="keyword">static</span> <span class="keywordtype">double</span> _as_double() { <span class="keywordflow">return</span> double(N) / double(D); }
|
||||
<a name="l00638"></a>00638 };
|
||||
<a name="l00639"></a>00639
|
||||
<a name="l00642"></a><a class="code" href="namespacetthread_1_1chrono.html">00642</a> <span class="keyword">namespace </span>chrono {
|
||||
<a name="l00645"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html">00645</a> <span class="keyword">template</span> <<span class="keyword">class</span> _Rep, <span class="keyword">class</span> _Period = ratio<1> > <span class="keyword">class </span><a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration</a> {
|
||||
<a name="l00646"></a>00646 <span class="keyword">private</span>:
|
||||
<a name="l00647"></a>00647 _Rep rep_;
|
||||
<a name="l00648"></a>00648 <span class="keyword">public</span>:
|
||||
<a name="l00649"></a>00649 <span class="keyword">typedef</span> _Rep rep;
|
||||
<a name="l00650"></a>00650 <span class="keyword">typedef</span> _Period period;
|
||||
<a name="l00651"></a>00651
|
||||
<a name="l00653"></a>00653 <span class="keyword">template</span> <<span class="keyword">class</span> _Rep2>
|
||||
<a name="l00654"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e">00654</a> <span class="keyword">explicit</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html#a5d86b0d68c98b74e3a6e541c1759ef3e" title="Construct a duration object with the given duration.">duration</a>(<span class="keyword">const</span> _Rep2& r) : rep_(r) {};
|
||||
<a name="l00655"></a>00655
|
||||
<a name="l00657"></a><a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020">00657</a> rep <a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()<span class="keyword"> const</span>
|
||||
<a name="l00658"></a>00658 <span class="keyword"> </span>{
|
||||
<a name="l00659"></a>00659 <span class="keywordflow">return</span> rep_;
|
||||
<a name="l00660"></a>00660 }
|
||||
<a name="l00661"></a>00661 };
|
||||
<a name="l00662"></a>00662
|
||||
<a name="l00663"></a>00663 <span class="comment">// Standard duration types.</span>
|
||||
<a name="l00664"></a><a class="code" href="namespacetthread_1_1chrono.html#a1396eccd0048d613bae0a745b55fa624">00664</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000000000></a> > <a class="code" href="namespacetthread_1_1chrono.html#a1396eccd0048d613bae0a745b55fa624" title="Duration with the unit nanoseconds.">nanoseconds</a>;
|
||||
<a name="l00665"></a><a class="code" href="namespacetthread_1_1chrono.html#add152055d7a764f3c1e5af1710f8814f">00665</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000000></a> > <a class="code" href="namespacetthread_1_1chrono.html#add152055d7a764f3c1e5af1710f8814f" title="Duration with the unit microseconds.">microseconds</a>;
|
||||
<a name="l00666"></a><a class="code" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75">00666</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<1, 1000></a> > <a class="code" href="namespacetthread_1_1chrono.html#a2cf88065d403d0e61022510769380b75" title="Duration with the unit milliseconds.">milliseconds</a>;
|
||||
<a name="l00667"></a><a class="code" href="namespacetthread_1_1chrono.html#a302ea2e096592e90ec58ccdcc6ec42c3">00667</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t></a> <a class="code" href="namespacetthread_1_1chrono.html#a302ea2e096592e90ec58ccdcc6ec42c3" title="Duration with the unit seconds.">seconds</a>;
|
||||
<a name="l00668"></a><a class="code" href="namespacetthread_1_1chrono.html#a2a9e93851a6aee0eb47cc6379287ee16">00668</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<60></a> > <a class="code" href="namespacetthread_1_1chrono.html#a2a9e93851a6aee0eb47cc6379287ee16" title="Duration with the unit minutes.">minutes</a>;
|
||||
<a name="l00669"></a><a class="code" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf">00669</a> <span class="keyword">typedef</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">duration<__intmax_t, ratio<3600></a> > <a class="code" href="namespacetthread_1_1chrono.html#af212c337748be0da79f5a3a509f36cdf" title="Duration with the unit hours.">hours</a>;
|
||||
<a name="l00670"></a>00670 }
|
||||
<a name="l00671"></a>00671
|
||||
<a name="l00674"></a><a class="code" href="namespacetthread_1_1this__thread.html">00674</a> <span class="keyword">namespace </span>this_thread {
|
||||
<a name="l00676"></a>00676 <a class="code" href="classtthread_1_1thread_1_1id.html" title="Thread ID.">thread::id</a> <a class="code" href="namespacetthread_1_1this__thread.html#ab9370620a3920b9ec550f84fb44fb032" title="Return the thread ID of the calling thread.">get_id</a>();
|
||||
<a name="l00677"></a>00677
|
||||
<a name="l00681"></a><a class="code" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd">00681</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacetthread_1_1this__thread.html#a867ef7ad1dd6026b7ee13bb013e00edd" title="Yield execution to another thread.">yield</a>()
|
||||
<a name="l00682"></a>00682 {
|
||||
<a name="l00683"></a>00683 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00684"></a>00684 <span class="preprocessor"></span> Sleep(0);
|
||||
<a name="l00685"></a>00685 <span class="preprocessor">#else</span>
|
||||
<a name="l00686"></a>00686 <span class="preprocessor"></span> sched_yield();
|
||||
<a name="l00687"></a>00687 <span class="preprocessor">#endif</span>
|
||||
<a name="l00688"></a>00688 <span class="preprocessor"></span> }
|
||||
<a name="l00689"></a>00689
|
||||
<a name="l00699"></a><a class="code" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398">00699</a> <span class="keyword">template</span> <<span class="keyword">class</span> _Rep, <span class="keyword">class</span> _Period> <span class="keywordtype">void</span> <a class="code" href="namespacetthread_1_1this__thread.html#acba48c6dbf12d38ab816c18c1ef96398" title="Blocks the calling thread for a period of time.">sleep_for</a>(<span class="keyword">const</span> <a class="code" href="classtthread_1_1chrono_1_1duration.html" title="Duration template class.">chrono::duration<_Rep, _Period></a>& aTime)
|
||||
<a name="l00700"></a>00700 {
|
||||
<a name="l00701"></a>00701 <span class="preprocessor">#if defined(_TTHREAD_WIN32_)</span>
|
||||
<a name="l00702"></a>00702 <span class="preprocessor"></span> Sleep(<span class="keywordtype">int</span>(<span class="keywordtype">double</span>(aTime.<a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()) * (1000.0 * _Period::_as_double()) + 0.5));
|
||||
<a name="l00703"></a>00703 <span class="preprocessor">#else</span>
|
||||
<a name="l00704"></a>00704 <span class="preprocessor"></span> usleep(<span class="keywordtype">int</span>(<span class="keywordtype">double</span>(aTime.<a class="code" href="classtthread_1_1chrono_1_1duration.html#a3f01111f479d27be202983aacb03c020" title="Return the value of the duration object.">count</a>()) * (1000000.0 * _Period::_as_double()) + 0.5));
|
||||
<a name="l00705"></a>00705 <span class="preprocessor">#endif</span>
|
||||
<a name="l00706"></a>00706 <span class="preprocessor"></span> }
|
||||
<a name="l00707"></a>00707 }
|
||||
<a name="l00708"></a>00708
|
||||
<a name="l00709"></a>00709 }
|
||||
<a name="l00710"></a>00710
|
||||
<a name="l00711"></a>00711 <span class="comment">// Define/macro cleanup</span>
|
||||
<a name="l00712"></a>00712 <span class="preprocessor">#undef _TTHREAD_DISABLE_ASSIGNMENT</span>
|
||||
<a name="l00713"></a>00713 <span class="preprocessor"></span>
|
||||
<a name="l00714"></a>00714 <span class="preprocessor">#endif // _TINYTHREAD_H_</span>
|
||||
</pre></div></div>
|
||||
</div>
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Mon May 7 2012 21:50:48 for TinyThread++ by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -47,7 +47,15 @@ freely, subject to the following restrictions:
|
||||
#endif
|
||||
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define __UNDEF_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef __UNDEF_LEAN_AND_MEAN
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#undef __UNDEF_LEAN_AND_MEAN
|
||||
#endif
|
||||
#else
|
||||
#ifdef _FAST_MUTEX_ASM_
|
||||
#include <sched.h>
|
||||
@@ -237,3 +245,4 @@ class fast_mutex {
|
||||
}
|
||||
|
||||
#endif // _FAST_MUTEX_H_
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -24,8 +24,6 @@ freely, subject to the following restrictions:
|
||||
#include <exception>
|
||||
#include "tinythread.h"
|
||||
|
||||
class thread;
|
||||
|
||||
#if defined(_TTHREAD_POSIX_)
|
||||
#include <unistd.h>
|
||||
#include <map>
|
||||
@@ -173,7 +171,7 @@ void * thread::wrapper_function(void * aArg)
|
||||
catch(...)
|
||||
{
|
||||
// Uncaught exceptions will terminate the application (default behavior
|
||||
// according to the C++0x draft)
|
||||
// according to C++11)
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
@@ -230,6 +228,7 @@ void thread::join()
|
||||
{
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
WaitForSingleObject(mHandle, INFINITE);
|
||||
CloseHandle(mHandle);
|
||||
#elif defined(_TTHREAD_POSIX_)
|
||||
pthread_join(mHandle, NULL);
|
||||
#endif
|
||||
@@ -244,6 +243,21 @@ bool thread::joinable() const
|
||||
return result;
|
||||
}
|
||||
|
||||
void thread::detach()
|
||||
{
|
||||
mDataMutex.lock();
|
||||
if(!mNotAThread)
|
||||
{
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
CloseHandle(mHandle);
|
||||
#elif defined(_TTHREAD_POSIX_)
|
||||
pthread_detach(mHandle);
|
||||
#endif
|
||||
mNotAThread = true;
|
||||
}
|
||||
mDataMutex.unlock();
|
||||
}
|
||||
|
||||
thread::id thread::get_id() const
|
||||
{
|
||||
if(!joinable())
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -31,7 +31,7 @@ freely, subject to the following restrictions:
|
||||
/// TinyThread++ is a minimal, portable implementation of basic threading
|
||||
/// classes for C++.
|
||||
///
|
||||
/// They closely mimic the functionality and naming of the C++0x standard, and
|
||||
/// They closely mimic the functionality and naming of the C++11 standard, and
|
||||
/// should be easily replaceable with the corresponding std:: variants.
|
||||
///
|
||||
/// @section port_sec Portability
|
||||
@@ -39,7 +39,7 @@ freely, subject to the following restrictions:
|
||||
/// classes, while for other systems, the POSIX threads API (pthread) is used.
|
||||
///
|
||||
/// @section class_sec Classes
|
||||
/// In order to mimic the threading API of the C++0x standard, subsets of
|
||||
/// In order to mimic the threading API of the C++11 standard, subsets of
|
||||
/// several classes are provided. The fundamental classes are:
|
||||
/// @li tthread::thread
|
||||
/// @li tthread::mutex
|
||||
@@ -67,7 +67,15 @@ freely, subject to the following restrictions:
|
||||
|
||||
// Platform specific includes
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define __UNDEF_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef __UNDEF_LEAN_AND_MEAN
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#undef __UNDEF_LEAN_AND_MEAN
|
||||
#endif
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
@@ -81,22 +89,22 @@ freely, subject to the following restrictions:
|
||||
/// TinyThread++ version (major number).
|
||||
#define TINYTHREAD_VERSION_MAJOR 1
|
||||
/// TinyThread++ version (minor number).
|
||||
#define TINYTHREAD_VERSION_MINOR 0
|
||||
#define TINYTHREAD_VERSION_MINOR 1
|
||||
/// TinyThread++ version (full version).
|
||||
#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)
|
||||
|
||||
// Do we have a fully featured C++0x compiler?
|
||||
// Do we have a fully featured C++11 compiler?
|
||||
#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L))
|
||||
#define _TTHREAD_CPP0X_
|
||||
#define _TTHREAD_CPP11_
|
||||
#endif
|
||||
|
||||
// ...at least partial C++0x?
|
||||
#if defined(_TTHREAD_CPP0X_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
|
||||
#define _TTHREAD_CPP0X_PARTIAL_
|
||||
// ...at least partial C++11?
|
||||
#if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
|
||||
#define _TTHREAD_CPP11_PARTIAL_
|
||||
#endif
|
||||
|
||||
// Macro for disabling assignments of objects.
|
||||
#ifdef _TTHREAD_CPP0X_PARTIAL_
|
||||
#ifdef _TTHREAD_CPP11_PARTIAL_
|
||||
#define _TTHREAD_DISABLE_ASSIGNMENT(name) \
|
||||
name(const name&) = delete; \
|
||||
name& operator=(const name&) = delete;
|
||||
@@ -108,18 +116,18 @@ freely, subject to the following restrictions:
|
||||
|
||||
/// @def thread_local
|
||||
/// Thread local storage keyword.
|
||||
/// A variable that is declared with the \c thread_local keyword makes the
|
||||
/// A variable that is declared with the @c thread_local keyword makes the
|
||||
/// value of the variable local to each thread (known as thread-local storage,
|
||||
/// or TLS). Example usage:
|
||||
/// @code
|
||||
/// // This variable is local to each thread.
|
||||
/// thread_local int variable;
|
||||
/// @endcode
|
||||
/// @note The \c thread_local keyword is a macro that maps to the corresponding
|
||||
/// compiler directive (e.g. \c __declspec(thread)). While the C++0x standard
|
||||
/// @note The @c thread_local keyword is a macro that maps to the corresponding
|
||||
/// compiler directive (e.g. @c __declspec(thread)). While the C++11 standard
|
||||
/// allows for non-trivial types (e.g. classes with constructors and
|
||||
/// destructors) to be declared with the \c thread_local keyword, most pre-C++0x
|
||||
/// compilers only allow for trivial types (e.g. \c int). So, to guarantee
|
||||
/// destructors) to be declared with the @c thread_local keyword, most pre-C++11
|
||||
/// compilers only allow for trivial types (e.g. @c int). So, to guarantee
|
||||
/// portable code, only use trivial types for thread local storage.
|
||||
/// @note 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
|
||||
@@ -127,7 +135,7 @@ freely, subject to the following restrictions:
|
||||
/// not support this directive.
|
||||
/// @hideinitializer
|
||||
|
||||
#if !defined(_TTHREAD_CPP0X_) && !defined(thread_local)
|
||||
#if !defined(_TTHREAD_CPP11_) && !defined(thread_local)
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
|
||||
#define thread_local __thread
|
||||
#else
|
||||
@@ -137,8 +145,8 @@ freely, subject to the following restrictions:
|
||||
|
||||
|
||||
/// Main name space for TinyThread++.
|
||||
/// This namespace is more or less equivalent to the \c std namespace for the
|
||||
/// C++0x thread classes. For instance, the tthread::mutex class corresponds to
|
||||
/// This namespace is more or less equivalent to the @c std namespace for the
|
||||
/// C++11 thread classes. For instance, the tthread::mutex class corresponds to
|
||||
/// the std::mutex class.
|
||||
namespace tthread {
|
||||
|
||||
@@ -175,7 +183,7 @@ class mutex {
|
||||
|
||||
/// Lock the mutex.
|
||||
/// The method will block the calling thread until a lock on the mutex can
|
||||
/// be obtained. The mutex remains locked until \c unlock() is called.
|
||||
/// be obtained. The mutex remains locked until @c unlock() is called.
|
||||
/// @see lock_guard
|
||||
inline void lock()
|
||||
{
|
||||
@@ -191,7 +199,7 @@ class mutex {
|
||||
/// Try to lock the mutex.
|
||||
/// The method will try to lock the mutex. If it fails, the function will
|
||||
/// return immediately (non-blocking).
|
||||
/// @return \c true if the lock was acquired, or \c false if the lock could
|
||||
/// @return @c true if the lock was acquired, or @c false if the lock could
|
||||
/// not be acquired.
|
||||
inline bool try_lock()
|
||||
{
|
||||
@@ -267,7 +275,7 @@ class recursive_mutex {
|
||||
|
||||
/// Lock the mutex.
|
||||
/// The method will block the calling thread until a lock on the mutex can
|
||||
/// be obtained. The mutex remains locked until \c unlock() is called.
|
||||
/// be obtained. The mutex remains locked until @c unlock() is called.
|
||||
/// @see lock_guard
|
||||
inline void lock()
|
||||
{
|
||||
@@ -281,7 +289,7 @@ class recursive_mutex {
|
||||
/// Try to lock the mutex.
|
||||
/// The method will try to lock the mutex. If it fails, the function will
|
||||
/// return immediately (non-blocking).
|
||||
/// @return \c true if the lock was acquired, or \c false if the lock could
|
||||
/// @return @c true if the lock was acquired, or @c false if the lock could
|
||||
/// not be acquired.
|
||||
inline bool try_lock()
|
||||
{
|
||||
@@ -405,7 +413,7 @@ class condition_variable {
|
||||
|
||||
/// Wait for the condition.
|
||||
/// The function will block the calling thread until the condition variable
|
||||
/// is woken by \c notify_one(), \c notify_all() or a spurious wake up.
|
||||
/// is woken by @c notify_one(), @c notify_all() or a spurious wake up.
|
||||
/// @param[in] aMutex A mutex that will be unlocked when the wait operation
|
||||
/// starts, an locked again as soon as the wait operation is finished.
|
||||
template <class _mutexT>
|
||||
@@ -481,7 +489,7 @@ class thread {
|
||||
class id;
|
||||
|
||||
/// Default constructor.
|
||||
/// Construct a \c thread object without an associated thread of execution
|
||||
/// Construct a @c thread object without an associated thread of execution
|
||||
/// (i.e. non-joinable).
|
||||
thread() : mHandle(0), mNotAThread(true)
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
@@ -490,7 +498,7 @@ class thread {
|
||||
{}
|
||||
|
||||
/// Thread starting constructor.
|
||||
/// Construct a \c thread object with a new thread of execution.
|
||||
/// Construct a @c thread object with a new thread of execution.
|
||||
/// @param[in] aFunction A function pointer to a function of type:
|
||||
/// <tt>void fun(void * arg)</tt>
|
||||
/// @param[in] aArg Argument to the thread function.
|
||||
@@ -500,24 +508,34 @@ class thread {
|
||||
thread(void (*aFunction)(void *), void * aArg);
|
||||
|
||||
/// Destructor.
|
||||
/// @note If the thread is joinable upon destruction, \c std::terminate()
|
||||
/// @note If the thread is joinable upon destruction, @c std::terminate()
|
||||
/// will be called, which terminates the process. It is always wise to do
|
||||
/// \c join() before deleting a thread object.
|
||||
/// @c join() before deleting a thread object.
|
||||
~thread();
|
||||
|
||||
/// Wait for the thread to finish (join execution flows).
|
||||
/// After calling @c join(), the thread object is no longer associated with
|
||||
/// a thread of execution (i.e. it is not joinable, and you may not join
|
||||
/// with it nor detach from it).
|
||||
void join();
|
||||
|
||||
/// Check if the thread is joinable.
|
||||
/// A thread object is joinable if it has an associated thread of execution.
|
||||
bool joinable() const;
|
||||
|
||||
/// Detach from the thread.
|
||||
/// After calling @c detach(), the thread object is no longer assicated with
|
||||
/// a thread of execution (i.e. it is not joinable). The thread continues
|
||||
/// execution without the calling thread blocking, and when the thread
|
||||
/// ends execution, any owned resources are released.
|
||||
void detach();
|
||||
|
||||
/// Return the thread ID of a thread object.
|
||||
id get_id() const;
|
||||
|
||||
/// Get the native handle for this thread.
|
||||
/// @note Under Windows, this is a \c HANDLE, and under POSIX systems, this
|
||||
/// is a \c pthread_t.
|
||||
/// @note Under Windows, this is a @c HANDLE, and under POSIX systems, this
|
||||
/// is a @c pthread_t.
|
||||
inline native_handle_type native_handle()
|
||||
{
|
||||
return mHandle;
|
||||
@@ -612,18 +630,18 @@ class thread::id {
|
||||
// Related to <ratio> - minimal to be able to support chrono.
|
||||
typedef long long __intmax_t;
|
||||
|
||||
/// Minimal implementation of the \c ratio class. This class provides enough
|
||||
/// functionality to implement some basic \c chrono classes.
|
||||
/// Minimal implementation of the @c ratio class. This class provides enough
|
||||
/// functionality to implement some basic @c chrono classes.
|
||||
template <__intmax_t N, __intmax_t D = 1> class ratio {
|
||||
public:
|
||||
static double _as_double() { return double(N) / double(D); }
|
||||
};
|
||||
|
||||
/// Minimal implementation of the \c chrono namespace.
|
||||
/// The \c chrono namespace provides types for specifying time intervals.
|
||||
/// Minimal implementation of the @c chrono namespace.
|
||||
/// The @c chrono namespace provides types for specifying time intervals.
|
||||
namespace chrono {
|
||||
/// Duration template class. This class provides enough functionality to
|
||||
/// implement \c this_thread::sleep_for().
|
||||
/// implement @c this_thread::sleep_for().
|
||||
template <class _Rep, class _Period = ratio<1> > class duration {
|
||||
private:
|
||||
_Rep rep_;
|
||||
@@ -651,7 +669,7 @@ namespace chrono {
|
||||
typedef duration<__intmax_t, ratio<3600> > hours; ///< Duration with the unit hours.
|
||||
}
|
||||
|
||||
/// The namespace \c this_thread provides methods for dealing with the
|
||||
/// The namespace @c this_thread provides methods for dealing with the
|
||||
/// calling thread.
|
||||
namespace this_thread {
|
||||
/// Return the thread ID of the calling thread.
|
||||
@@ -1,7 +1,7 @@
|
||||
#-----------------------------------------------------------------------------------------
|
||||
# Makefile for GCC & gmake (Linux, Windows/MinGW, OpenSolaris, etc).
|
||||
#-----------------------------------------------------------------------------------------
|
||||
# Copyright (c) 2010 Marcus Geelnard
|
||||
# Copyright (c) 2010-2012 Marcus Geelnard
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
@@ -75,7 +75,7 @@ TINYTHREAD_OBJS = tinythread.o
|
||||
all: hello$(EXE) test$(EXE) fractal$(EXE)
|
||||
|
||||
clean:
|
||||
$(RM) hello$(EXE) test$(EXE) fractal$(EXE) $(HELLO_OBJS) $(TEST_OBJS) $(FRACAL_OBJS) $(TINYTHREAD_OBJS)
|
||||
$(RM) hello$(EXE) test$(EXE) fractal$(EXE) $(HELLO_OBJS) $(TEST_OBJS) $(FRACAL_OBJS) $(TINYTHREAD_OBJS) fractal.tga
|
||||
|
||||
|
||||
test$(EXE): $(TEST_OBJS) $(TINYTHREAD_OBJS)
|
||||
@@ -98,3 +98,4 @@ hello.o: hello.cpp ../source/tinythread.h
|
||||
test.o: test.cpp ../source/tinythread.h ../source/fast_mutex.h
|
||||
fractal.o: fractal.cpp ../source/tinythread.h
|
||||
tinythread.o: ../source/tinythread.cpp ../source/tinythread.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Makefile for Microsoft Visual Studio C++
|
||||
# Usage: nmake /f Makefile.msvc
|
||||
#-----------------------------------------------------------------------------------------
|
||||
# Copyright (c) 2010 Marcus Geelnard
|
||||
# Copyright (c) 2010-2012 Marcus Geelnard
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
@@ -75,3 +75,4 @@ fractal.obj: fractal.cpp ../source/tinythread.h
|
||||
|
||||
tinythread.obj: ../source/tinythread.cpp ../source/tinythread.h
|
||||
$(CPP) $(CPPFLAGS) ../source/tinythread.cpp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -31,26 +31,26 @@ freely, subject to the following restrictions:
|
||||
|
||||
using namespace std;
|
||||
using namespace tthread;
|
||||
|
||||
|
||||
// Mandelbrot fractal settings
|
||||
|
||||
|
||||
// Mandelbrot fractal settings
|
||||
#define MAND_MID_RE -0.69795
|
||||
#define MAND_MID_IM -0.34865
|
||||
#define MAND_SIZE 0.003
|
||||
#define MAND_MAX_ITER 4000
|
||||
#define MAND_RESOLUTION 1024
|
||||
|
||||
#define MAND_SIZE 0.003
|
||||
#define MAND_MAX_ITER 4000
|
||||
#define MAND_RESOLUTION 1024
|
||||
|
||||
|
||||
/// BGR pixel class.
|
||||
class Pixel {
|
||||
public:
|
||||
Pixel() : r(0), g(0), b(0) {}
|
||||
Pixel() : b(0), g(0), r(0) {}
|
||||
|
||||
Pixel(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
r = red;
|
||||
g = green;
|
||||
b = blue;
|
||||
g = green;
|
||||
r = red;
|
||||
}
|
||||
|
||||
unsigned char b, g, r;
|
||||
@@ -108,37 +108,37 @@ class Image {
|
||||
int mHeight; ///< Image height.
|
||||
Pixel * mData; ///< Data pointer.
|
||||
};
|
||||
|
||||
/// The RowDispatcher class manages the "job pool" for the fractal
|
||||
/// calculation threads.
|
||||
class RowDispatcher {
|
||||
public:
|
||||
RowDispatcher(Image * aImage) : mNextRow(0)
|
||||
{
|
||||
mImage = aImage;
|
||||
}
|
||||
|
||||
Image * GetImage()
|
||||
{
|
||||
return mImage;
|
||||
}
|
||||
|
||||
int NextRow()
|
||||
{
|
||||
lock_guard<mutex> guard(mMutex);
|
||||
if(mNextRow >= mImage->Height())
|
||||
return -1;
|
||||
int result = mNextRow;
|
||||
++ mNextRow;
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
mutex mMutex;
|
||||
int mNextRow;
|
||||
Image * mImage;
|
||||
};
|
||||
|
||||
|
||||
/// The RowDispatcher class manages the "job pool" for the fractal
|
||||
/// calculation threads.
|
||||
class RowDispatcher {
|
||||
public:
|
||||
RowDispatcher(Image * aImage) : mNextRow(0)
|
||||
{
|
||||
mImage = aImage;
|
||||
}
|
||||
|
||||
Image * GetImage()
|
||||
{
|
||||
return mImage;
|
||||
}
|
||||
|
||||
int NextRow()
|
||||
{
|
||||
lock_guard<mutex> guard(mMutex);
|
||||
if(mNextRow >= mImage->Height())
|
||||
return -1;
|
||||
int result = mNextRow;
|
||||
++ mNextRow;
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
mutex mMutex;
|
||||
int mNextRow;
|
||||
Image * mImage;
|
||||
};
|
||||
|
||||
// Core iteration function
|
||||
Pixel Iterate(const double &cre, const double &cim, int aIterMax)
|
||||
{
|
||||
@@ -166,13 +166,13 @@ Pixel Iterate(const double &cre, const double &cim, int aIterMax)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Calculation thread
|
||||
void CalcThread(void * arg)
|
||||
{
|
||||
RowDispatcher * dispatcher = (RowDispatcher *) arg;
|
||||
Image * img = dispatcher->GetImage();
|
||||
|
||||
|
||||
// Calculation thread
|
||||
void CalcThread(void * arg)
|
||||
{
|
||||
RowDispatcher * dispatcher = (RowDispatcher *) arg;
|
||||
Image * img = dispatcher->GetImage();
|
||||
|
||||
// Set min/max interval for the fractal set
|
||||
double xMin = MAND_MID_RE - MAND_SIZE * 0.5;
|
||||
double yMin = MAND_MID_IM - MAND_SIZE * 0.5;
|
||||
@@ -183,17 +183,17 @@ void CalcThread(void * arg)
|
||||
double xStep = (xMax - xMin) / img->Width();
|
||||
double yStep = (yMax - yMin) / img->Height();
|
||||
|
||||
// Until no more rows to process...
|
||||
while(true)
|
||||
{
|
||||
// Get the next row to calculate
|
||||
int y = dispatcher->NextRow();
|
||||
|
||||
// Done?
|
||||
if(y < 0)
|
||||
break;
|
||||
|
||||
// Generate one row of the image
|
||||
// Until no more rows to process...
|
||||
while(true)
|
||||
{
|
||||
// Get the next row to calculate
|
||||
int y = dispatcher->NextRow();
|
||||
|
||||
// Done?
|
||||
if(y < 0)
|
||||
break;
|
||||
|
||||
// Generate one row of the image
|
||||
Pixel * line = &(*img)[y * img->Width()];
|
||||
double cim = y * yStep + yMin;
|
||||
double cre = xMin;
|
||||
@@ -202,32 +202,32 @@ void CalcThread(void * arg)
|
||||
*line ++ = Iterate(cre, cim, MAND_MAX_ITER);
|
||||
cre += xStep;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// Show some information about this program...
|
||||
cout << "This is a small multi threaded Mandelbrot fractal generator." << endl;
|
||||
cout << endl;
|
||||
cout << "The program will generate a " << MAND_RESOLUTION << "x" << MAND_RESOLUTION << " image, using one calculation thread per" << endl;
|
||||
cout << "processor core. The result is written to a TGA format image, \"fractal.tga\"." << endl;
|
||||
cout << endl;
|
||||
cout << "Type \"" << argv[0] << " -st\" to force single threaded operation." << endl;
|
||||
cout << endl;
|
||||
|
||||
// Check arguments
|
||||
bool singleThreaded = false;
|
||||
if((argc >= 2) && (string(argv[1]) == string("-st")))
|
||||
singleThreaded = true;
|
||||
|
||||
{
|
||||
// Show some information about this program...
|
||||
cout << "This is a small multi threaded Mandelbrot fractal generator." << endl;
|
||||
cout << endl;
|
||||
cout << "The program will generate a " << MAND_RESOLUTION << "x" << MAND_RESOLUTION << " image, using one calculation thread per" << endl;
|
||||
cout << "processor core. The result is written to a TGA format image, \"fractal.tga\"." << endl;
|
||||
cout << endl;
|
||||
cout << "Type \"" << argv[0] << " -st\" to force single threaded operation." << endl;
|
||||
cout << endl;
|
||||
|
||||
// Check arguments
|
||||
bool singleThreaded = false;
|
||||
if((argc >= 2) && (string(argv[1]) == string("-st")))
|
||||
singleThreaded = true;
|
||||
|
||||
// Init image and row dispatcher
|
||||
Image img(MAND_RESOLUTION, MAND_RESOLUTION);
|
||||
RowDispatcher dispatcher(&img);
|
||||
|
||||
// Determine the number of calculation threads to use
|
||||
int numThreads;
|
||||
if(!singleThreaded)
|
||||
Image img(MAND_RESOLUTION, MAND_RESOLUTION);
|
||||
RowDispatcher dispatcher(&img);
|
||||
|
||||
// Determine the number of calculation threads to use
|
||||
int numThreads;
|
||||
if(!singleThreaded)
|
||||
{
|
||||
numThreads = thread::hardware_concurrency();
|
||||
if(numThreads < 1)
|
||||
@@ -235,27 +235,27 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
numThreads = 1;
|
||||
|
||||
// Start calculation threads (we run one thread on each processor core)
|
||||
cout << "Running " << numThreads << " calculation thread(s)..." << flush;
|
||||
list<thread *> threadList;
|
||||
for(int i = 0; i < numThreads; ++ i)
|
||||
{
|
||||
thread * t = new thread(CalcThread, (void *) &dispatcher);
|
||||
threadList.push_back(t);
|
||||
}
|
||||
|
||||
// Wait for the threads to complete...
|
||||
for(list<thread *>::iterator i = threadList.begin(); i != threadList.end(); ++ i)
|
||||
{
|
||||
thread * t = *i;
|
||||
t->join();
|
||||
delete t;
|
||||
}
|
||||
cout << "done!" << endl;
|
||||
|
||||
|
||||
// Start calculation threads (we run one thread on each processor core)
|
||||
cout << "Running " << numThreads << " calculation thread(s)..." << flush;
|
||||
list<thread *> threadList;
|
||||
for(int i = 0; i < numThreads; ++ i)
|
||||
{
|
||||
thread * t = new thread(CalcThread, (void *) &dispatcher);
|
||||
threadList.push_back(t);
|
||||
}
|
||||
|
||||
// Wait for the threads to complete...
|
||||
for(list<thread *>::iterator i = threadList.begin(); i != threadList.end(); ++ i)
|
||||
{
|
||||
thread * t = *i;
|
||||
t->join();
|
||||
delete t;
|
||||
}
|
||||
cout << "done!" << endl;
|
||||
|
||||
// Write the final image to a file
|
||||
cout << "Writing final image..." << flush;
|
||||
cout << "Writing final image..." << flush;
|
||||
img.WriteToTGAFile("fractal.tga");
|
||||
cout << "done!" << endl;
|
||||
cout << "done!" << endl;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010 Marcus Geelnard
|
||||
/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
|
||||
Copyright (c) 2010-2012 Marcus Geelnard
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -28,17 +28,17 @@ freely, subject to the following restrictions:
|
||||
|
||||
using namespace std;
|
||||
using namespace tthread;
|
||||
|
||||
// HACK: Mac OS X and early MinGW do not support thread-local storage
|
||||
#if defined(__APPLE__) || (defined(__MINGW32__) && (__GNUC__ < 4))
|
||||
#define NO_TLS
|
||||
#endif
|
||||
|
||||
|
||||
// Thread local storage variable
|
||||
#ifndef NO_TLS
|
||||
// HACK: Mac OS X and early MinGW do not support thread-local storage
|
||||
#if defined(__APPLE__) || (defined(__MINGW32__) && (__GNUC__ < 4))
|
||||
#define NO_TLS
|
||||
#endif
|
||||
|
||||
|
||||
// Thread local storage variable
|
||||
#ifndef NO_TLS
|
||||
thread_local int gLocalVar;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Mutex + global count variable
|
||||
mutex gMutex;
|
||||
@@ -53,15 +53,15 @@ void ThreadIDs(void * aArg)
|
||||
{
|
||||
cout << " My thread id is " << this_thread::get_id() << "." << endl;
|
||||
}
|
||||
|
||||
#ifndef NO_TLS
|
||||
|
||||
#ifndef NO_TLS
|
||||
// Thread function: Thread-local storage
|
||||
void ThreadTLS(void * aArg)
|
||||
{
|
||||
gLocalVar = 2;
|
||||
cout << " My gLocalVar is " << gLocalVar << "." << endl;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Thread function: Mutex locking
|
||||
void ThreadLock(void * aArg)
|
||||
@@ -111,6 +111,13 @@ void ThreadYield(void * aArg)
|
||||
this_thread::yield();
|
||||
}
|
||||
|
||||
// Thread function: Detach
|
||||
void ThreadDetach(void * aArg)
|
||||
{
|
||||
// We don't do anything much, just sleep a little...
|
||||
this_thread::sleep_for(chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
|
||||
// This is the main program (i.e. the main thread)
|
||||
int main()
|
||||
@@ -138,7 +145,7 @@ int main()
|
||||
|
||||
// Test 3: thread local storage
|
||||
cout << endl << "PART III: Thread local storage" << endl;
|
||||
#ifndef NO_TLS
|
||||
#ifndef NO_TLS
|
||||
{
|
||||
// Clear the TLS variable (it should keep this value after all threads are
|
||||
// finished).
|
||||
@@ -155,9 +162,9 @@ int main()
|
||||
else
|
||||
cout << " Main gLocalID was changed by the child thread - FAIL!" << endl;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
cout << " TLS is not supported on this platform..." << endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Test 4: mutex locking
|
||||
cout << endl << "PART IV: Mutex locking (100 threads x 10000 iterations)" << endl;
|
||||
@@ -268,4 +275,12 @@ int main()
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
// Test 9: detach
|
||||
cout << endl << "PART IX: Detach" << endl;
|
||||
{
|
||||
thread t(ThreadDetach, 0);
|
||||
t.detach();
|
||||
cout << " Detached from thread." << endl;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "base/hash.h"
|
||||
|
||||
namespace operations_research {
|
||||
#if defined(__linux__) || defined(_MSC_VER)
|
||||
#if defined(__linux__) || defined(_MSC_VER) || defined(__APPLE__)
|
||||
struct Foo {
|
||||
Foo() { std::cout << "Foo::Foo\n"; }
|
||||
~Foo() { std::cout << "Foo::~Foo\n"; }
|
||||
|
||||
@@ -137,10 +137,10 @@ dependencies/sources/coin-cbc/Makefile.in:
|
||||
cd dependencies/sources/coin-cbc && patch -p0 -i ../../archives/fix_cbc2.8.5_mavericks.patch
|
||||
|
||||
# Install pcre (dependency of SWIG).
|
||||
dependencies/install/bin/pcretest: dependencies/sources/pcre/Makefile
|
||||
dependencies/install/bin/pcretest: dependencies/sources/pcre-$(PCRE_TAG)/Makefile
|
||||
cd dependencies/sources/pcre-$(PCRE_TAG) && make install
|
||||
|
||||
dependencies/sources/pcre/Makefile: dependencies/sources/pcre/configure
|
||||
dependencies/sources/pcre-$(PCRE_TAG)/Makefile: dependencies/sources/pcre-$(PCRE_TAG)/configure
|
||||
cd dependencies/sources/pcre-$(PCRE_TAG) && ./configure --disable-shared --prefix=$(OR_ROOT_FULL)/dependencies/install
|
||||
|
||||
dependencies/sources/pcre/configure: dependencies/archives/pcre-$(PCRE_TAG).tar.gz
|
||||
@@ -152,16 +152,13 @@ dependencies/archives/pcre-$(PCRE_TAG).tar.gz:
|
||||
# Install SWIG.
|
||||
install_swig: dependencies/install/bin/swig
|
||||
|
||||
dependencies/install/bin/swig: dependencies/sources/swig/Makefile
|
||||
cd dependencies/sources/swig-$(SWIG_TAG) && make && make install
|
||||
dependencies/install/bin/swig: dependencies/sources/swig-$(SWIG_TAG)/Makefile
|
||||
cd dependencies/sources/swig-$(SWIG_TAG) && make install
|
||||
|
||||
dependencies/sources/swig/Makefile: dependencies/sources/swig/configure dependencies/install/bin/pcretest
|
||||
dependencies/sources/swig-$(SWIG_TAG)/Makefile: dependencies/sources/swig-$(SWIG_TAG)/configure dependencies/install/bin/pcretest
|
||||
cd dependencies/sources/swig-$(SWIG_TAG) && ./configure --prefix=$(OR_ROOT_FULL)/dependencies/install --with-pcre-prefix=$(OR_ROOT_FULL)/dependencies/install --disable-ccache --without-octave
|
||||
|
||||
dependencies/sources/swig/configure: dependencies/sources/swig/autogen.sh
|
||||
cd dependencies/sources/swig-$(SWIG_TAG) && ./autogen.sh
|
||||
|
||||
dependencies/sources/swig/autogen.sh: dependencies/archives/swig-$(SWIG_TAG).tar.gz
|
||||
dependencies/sources/swig-$(SWIG_TAG)/configure: dependencies/archives/swig-$(SWIG_TAG).tar.gz
|
||||
cd dependencies/sources && tar xvzmf ../archives/swig-$(SWIG_TAG).tar.gz
|
||||
|
||||
dependencies/archives/swig-$(SWIG_TAG).tar.gz:
|
||||
|
||||
@@ -41,7 +41,7 @@ PROTOBUF_INC = -I$(UNIX_PROTOBUF_DIR)/include
|
||||
# This is needed to find sparse hash containers.
|
||||
SPARSEHASH_INC = -I$(UNIX_SPARSEHASH_DIR)/include
|
||||
# Tinythread
|
||||
THREAD_INC = -I$(OR_ROOT)dependencies/sources/TinyThread++-1.0/source
|
||||
THREAD_INC = -I$(OR_ROOT)dependencies/sources/TinyThread++-1.1/source
|
||||
|
||||
# Define UNIX_CLP_DIR if unset and if UNIX_CBC_DIR is set.
|
||||
ifdef UNIX_CBC_DIR
|
||||
|
||||
@@ -46,9 +46,7 @@ ZLIB_INC = /I$(WINDOWS_ZLIB_DIR)\\include
|
||||
PROTOBUF_INC = /I$(WINDOWS_PROTOBUF_DIR)\\include
|
||||
SPARSEHASH_INC = /I$(WINDOWS_SPARSEHASH_DIR)\\include
|
||||
# Tinythread
|
||||
THREAD_INC = /I$(OR_ROOT)dependencies\\sources\\TinyThread++-1.0\\source
|
||||
# Tinythread
|
||||
MINISAT_INC = /I$(OR_ROOT)dependencies\\sources\\Minisat
|
||||
THREAD_INC = /I$(OR_ROOT)dependencies\\sources\\TinyThread++-1.1\\source
|
||||
|
||||
PYTHONVERSION = $(WINDOWS_PYTHON_VERSION)
|
||||
PYTHON_INC=/I$(WINDOWS_PYTHON_PATH)\\include
|
||||
|
||||