Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 260

ucommon-doc-5.0.4-1mdv2010.2.i586.rpm

<!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>ucommon: ucommon::RecursiveMutex 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="main.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>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00208.html">ucommon</a>::<a class="el" href="a00114.html">RecursiveMutex</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::RecursiveMutex Class Reference</h1><!-- doxytag: class="ucommon::RecursiveMutex" --><!-- doxytag: inherits="ucommon::Conditional,ucommon::ExclusiveProtocol" -->
<p>Portable recursive exclusive lock.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00202_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucommon::RecursiveMutex:</div>
<div class="dynsection">
<div class="center"><img src="a00483.png" border="0" usemap="#ucommon_1_1_recursive_mutex_inherit__map" alt="Inheritance graph"/></div>
<map name="ucommon_1_1_recursive_mutex_inherit__map" id="ucommon_1_1_recursive_mutex_inherit__map">
<area shape="rect" id="node2" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,5,227,32"/><area shape="rect" id="node4" href="a00049.html" title="An exclusive locking protocol interface base." alt="" coords="251,5,533,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucommon::RecursiveMutex:</div>
<div class="dynsection">
<div class="center"><img src="a00484.png" border="0" usemap="#ucommon_1_1_recursive_mutex_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1_recursive_mutex_coll__map" id="ucommon_1_1_recursive_mutex_coll__map">
<area shape="rect" id="node2" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,5,227,32"/><area shape="rect" id="node4" href="a00049.html" title="An exclusive locking protocol interface base." alt="" coords="251,5,533,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<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">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#ab27b64df792abea9122f8edae8fa8859">getLocking</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of recursive locking levels.  <a href="#ab27b64df792abea9122f8edae8fa8859"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#a54db836deab30561ebb7d19ecfed9f0c">getWaiting</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads waiting on lock.  <a href="#a54db836deab30561ebb7d19ecfed9f0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16e8a79965c9afb5c2eca6b6258e6cbd"></a><!-- doxytag: member="ucommon::RecursiveMutex::lock" ref="a16e8a79965c9afb5c2eca6b6258e6cbd" args="(timeout_t timeout)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#a16e8a79965c9afb5c2eca6b6258e6cbd">lock</a> (<a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Timed lock request. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5b50251914d7eaeb73f0075ec466d41"></a><!-- doxytag: member="ucommon::RecursiveMutex::lock" ref="ad5b50251914d7eaeb73f0075ec466d41" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#ad5b50251914d7eaeb73f0075ec466d41">lock</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire or increase locking. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5ce8ca5d0dc955b360f8ca90c19edf4"></a><!-- doxytag: member="ucommon::RecursiveMutex::RecursiveMutex" ref="ab5ce8ca5d0dc955b360f8ca90c19edf4" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#ab5ce8ca5d0dc955b360f8ca90c19edf4">RecursiveMutex</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create rexlock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa56322f581c331e7f15049a0a9ecf3e9"></a><!-- doxytag: member="ucommon::RecursiveMutex::release" ref="aa56322f581c331e7f15049a0a9ecf3e9" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#aa56322f581c331e7f15049a0a9ecf3e9">release</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release or decrease locking. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#a33bde5ad340d5882f67c613a4859fefc">lock</a> (<a class="el" href="a00114.html">RecursiveMutex</a> &amp;rex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience method to lock a recursive lock.  <a href="#a33bde5ad340d5882f67c613a4859fefc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#ab4f94eb56dfac570acc28bb12d1f0b02">release</a> (<a class="el" href="a00114.html">RecursiveMutex</a> &amp;rex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience method to unlock a recursive lock.  <a href="#ab4f94eb56dfac570acc28bb12d1f0b02"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea82b5b9b49f9dc5207659fa4f7ba75b"></a><!-- doxytag: member="ucommon::RecursiveMutex::Exlock" ref="aea82b5b9b49f9dc5207659fa4f7ba75b" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#aea82b5b9b49f9dc5207659fa4f7ba75b">Exlock</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Protocol interface to exclusive lock the object. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a892892bf7841cece0b29230a740bcc80"></a><!-- doxytag: member="ucommon::RecursiveMutex::Unlock" ref="a892892bf7841cece0b29230a740bcc80" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#a892892bf7841cece0b29230a740bcc80">Unlock</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Protocol interface to release a lock. <br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6233ee03489fd4d368bf9d701fba2287"></a><!-- doxytag: member="ucommon::RecursiveMutex::locker" ref="a6233ee03489fd4d368bf9d701fba2287" args="" -->
pthread_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>locker</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc63db2763005af45a466c743add8b22"></a><!-- doxytag: member="ucommon::RecursiveMutex::lockers" ref="abc63db2763005af45a466c743add8b22" args="" -->
unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><b>lockers</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c5f4f6e4b85133e5c2500f2d332d798"></a><!-- doxytag: member="ucommon::RecursiveMutex::waiting" ref="a7c5f4f6e4b85133e5c2500f2d332d798" args="" -->
unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><b>waiting</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Portable recursive exclusive lock. </p>
<p>This class is built from the conditional and hence does not require support for non-standard and platform specific extensions to pthread mutex to support recrusive style mutex locking. The exclusive protocol is implimented to support <a class="el" href="a00048.html" title="A kind of smart pointer object to support exclusive locking protocol.">exclusive_lock</a> referencing. </p>

<p>Definition at line <a class="el" href="a00202_source.html#l00477">477</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab27b64df792abea9122f8edae8fa8859"></a><!-- doxytag: member="ucommon::RecursiveMutex::getLocking" ref="ab27b64df792abea9122f8edae8fa8859" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned ucommon::RecursiveMutex::getLocking </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of recursive locking levels. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>locking level. </dd></dl>

</div>
</div>
<a class="anchor" id="a54db836deab30561ebb7d19ecfed9f0c"></a><!-- doxytag: member="ucommon::RecursiveMutex::getWaiting" ref="a54db836deab30561ebb7d19ecfed9f0c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned ucommon::RecursiveMutex::getWaiting </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of threads waiting on lock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>wating thread count. </dd></dl>

</div>
</div>
<a class="anchor" id="a33bde5ad340d5882f67c613a4859fefc"></a><!-- doxytag: member="ucommon::RecursiveMutex::lock" ref="a33bde5ad340d5882f67c613a4859fefc" args="(RecursiveMutex &amp;rex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucommon::RecursiveMutex::lock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00114.html">RecursiveMutex</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience method to lock a recursive lock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rex</em>&nbsp;</td><td>lock to lock. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00524">524</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00114_a33bde5ad340d5882f67c613a4859fefc_cgraph.png" border="0" usemap="#a00114_a33bde5ad340d5882f67c613a4859fefc_cgraph_map" alt=""></div>
<map name="a00114_a33bde5ad340d5882f67c613a4859fefc_cgraph_map" id="a00114_a33bde5ad340d5882f67c613a4859fefc_cgraph">
<area shape="rect" id="node3" href="a00114.html#ad5b50251914d7eaeb73f0075ec466d41" title="Acquire or increase locking." alt="" coords="365,5,677,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ab4f94eb56dfac570acc28bb12d1f0b02"></a><!-- doxytag: member="ucommon::RecursiveMutex::release" ref="ab4f94eb56dfac570acc28bb12d1f0b02" args="(RecursiveMutex &amp;rex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucommon::RecursiveMutex::release </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00114.html">RecursiveMutex</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience method to unlock a recursive lock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rex</em>&nbsp;</td><td>lock to release. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00531">531</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00114_ab4f94eb56dfac570acc28bb12d1f0b02_cgraph.png" border="0" usemap="#a00114_ab4f94eb56dfac570acc28bb12d1f0b02_cgraph_map" alt=""></div>
<map name="a00114_ab4f94eb56dfac570acc28bb12d1f0b02_cgraph_map" id="a00114_ab4f94eb56dfac570acc28bb12d1f0b02_cgraph">
<area shape="rect" id="node3" href="a00114.html#aa56322f581c331e7f15049a0a9ecf3e9" title="Release or decrease locking." alt="" coords="399,5,740,32"/></map>
</div>
</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00202_source.html">thread.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:54 2011 for ucommon 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>