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

127 lines
6.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TinyThread++: mutex 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&nbsp;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&nbsp;List</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;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>
</div>
<div class="contents">
<h1>mutex Class Reference</h1><!-- doxytag: class="tthread::mutex" -->
<p>Mutex class.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="tinythread_8h_source.html">tinythread.h</a>&gt;</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>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef42e2bd0ea2ffa8ce1cdc7e5d183910"></a><!-- doxytag: member="tthread::mutex::mutex" ref="aef42e2bd0ea2ffa8ce1cdc7e5d183910" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aef42e2bd0ea2ffa8ce1cdc7e5d183910">mutex</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a3ab9328c3addeb57045f45910b10a1cf">~mutex</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa81aed607133209dade63a226818224d">lock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lock the mutex. <a href="#aa81aed607133209dade63a226818224d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#aa24a64f788f142df670c3abc809d32b6">try_lock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</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>
<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>
<a class="anchor" id="aa81aed607133209dade63a226818224d"></a><!-- doxytag: member="tthread::mutex::lock" ref="aa81aed607133209dade63a226818224d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void lock </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Lock the mutex. </p>
<p>The method will block the calling thread until a lock on the mutex can be obtained. The mutex remains locked until <code><a class="el" href="classtthread_1_1mutex.html#a9278be8203e1c42e2619179882ae4403" title="Unlock the mutex.">unlock()</a></code> is called. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtthread_1_1lock__guard.html" title="Lock guard class.">lock_guard</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aa24a64f788f142df670c3abc809d32b6"></a><!-- doxytag: member="tthread::mutex::try_lock" ref="aa24a64f788f142df670c3abc809d32b6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool try_lock </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Try to lock the mutex. </p>
<p>The method will try to lock the mutex. If it fails, the function will return immediately (non-blocking). </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the lock was acquired, or <code>false</code> if the lock could not be acquired. </dd></dl>
</div>
</div>
<a class="anchor" id="a9278be8203e1c42e2619179882ae4403"></a><!-- doxytag: member="tthread::mutex::unlock" ref="a9278be8203e1c42e2619179882ae4403" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void unlock </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Unlock the mutex. </p>
<p>If any threads are waiting for the lock on this mutex, one of them will be unblocked. </p>
</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&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>