Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 73

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::ConditionalLock 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="a00038.html">ConditionalLock</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::ConditionalLock Class Reference</h1><!-- doxytag: class="ucommon::ConditionalLock" --><!-- doxytag: inherits="ucommon::ConditionalAccess,ucommon::SharedProtocol" -->
<p>An optimized and convertable shared 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::ConditionalLock:</div>
<div class="dynsection">
<div class="center"><img src="a00363.png" border="0" usemap="#ucommon_1_1_conditional_lock_inherit__map" alt="Inheritance graph"/></div>
<map name="ucommon_1_1_conditional_lock_inherit__map" id="ucommon_1_1_conditional_lock_inherit__map">
<area shape="rect" id="node2" href="a00037.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks." alt="" coords="5,80,288,107"/><area shape="rect" id="node4" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="36,5,257,32"/><area shape="rect" id="node6" href="a00128.html" title="An exclusive locking protocol interface base." alt="" coords="312,80,563,107"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucommon::ConditionalLock:</div>
<div class="dynsection">
<div class="center"><img src="a00364.png" border="0" usemap="#ucommon_1_1_conditional_lock_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1_conditional_lock_coll__map" id="ucommon_1_1_conditional_lock_coll__map">
<area shape="rect" id="node2" href="a00037.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks." alt="" coords="5,91,288,117"/><area shape="rect" id="node4" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="36,5,257,32"/><area shape="rect" id="node6" href="a00128.html" title="An exclusive locking protocol interface base." alt="" coords="312,91,563,117"/><area shape="rect" id="node8" href="a00067.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="587,91,819,117"/><area shape="rect" id="node10" href="a00095.html" title="A common base class for all managed objects." alt="" coords="577,5,828,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"><a class="anchor" id="a6c50babda6e4c056be90b754738d2d5d"></a><!-- doxytag: member="ucommon::ConditionalLock::access" ref="a6c50babda6e4c056be90b754738d2d5d" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a6c50babda6e4c056be90b754738d2d5d">access</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire access (shared read) lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8b1287c294c8abc9c30000e9d5b9052"></a><!-- doxytag: member="ucommon::ConditionalLock::commit" ref="aa8b1287c294c8abc9c30000e9d5b9052" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aa8b1287c294c8abc9c30000e9d5b9052">commit</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Commit changes / release a modify lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf4faa9d764c31cfedc6bec4caf84504"></a><!-- doxytag: member="ucommon::ConditionalLock::ConditionalLock" ref="aaf4faa9d764c31cfedc6bec4caf84504" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aaf4faa9d764c31cfedc6bec4caf84504">ConditionalLock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct conditional lock for default concurrency. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a719bfdd193be78ad51d5b034822fbb2f">exclusive</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert read lock into exclusive (write/modify) access.  <a href="#a719bfdd193be78ad51d5b034822fbb2f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa35ee960df082b8418c8586357d30e9e"></a><!-- doxytag: member="ucommon::ConditionalLock::getReaders" ref="aa35ee960df082b8418c8586357d30e9e" args="(void)" -->
unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#aa35ee960df082b8418c8586357d30e9e">getReaders</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads reading (sharing) the lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f8863e11e9f339b5c9aa69029f964b1"></a><!-- doxytag: member="ucommon::ConditionalLock::getWaiters" ref="a3f8863e11e9f339b5c9aa69029f964b1" args="(void)" -->
unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a3f8863e11e9f339b5c9aa69029f964b1">getWaiters</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads waiting to share the lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3d3a37cc1d24d1326deb9755ce0f6171"></a><!-- doxytag: member="ucommon::ConditionalLock::modify" ref="a3d3a37cc1d24d1326deb9755ce0f6171" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a3d3a37cc1d24d1326deb9755ce0f6171">modify</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire write (exclusive modify) lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9a0b040d4d65870ac7d67d2b96cea50"></a><!-- doxytag: member="ucommon::ConditionalLock::release" ref="ae9a0b040d4d65870ac7d67d2b96cea50" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ae9a0b040d4d65870ac7d67d2b96cea50">release</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release a shared lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93aa50cae673c104a3436940de1e63b8"></a><!-- doxytag: member="ucommon::ConditionalLock::share" ref="a93aa50cae673c104a3436940de1e63b8" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a93aa50cae673c104a3436940de1e63b8">share</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an exclusive access lock back to share mode. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ba38a0c29768c14b378dc2e69abac72"></a><!-- doxytag: member="ucommon::ConditionalLock::~ConditionalLock" ref="a0ba38a0c29768c14b378dc2e69abac72" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a0ba38a0c29768c14b378dc2e69abac72">~ConditionalLock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy conditional lock. <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="a00038.html#a7428dc9f2df3b5c4685504bf2d4be6f3">access</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to aqcuire a shared lock.  <a href="#a7428dc9f2df3b5c4685504bf2d4be6f3"></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="a00038.html#ac36f33d35e7fd2923474f449e5c936e0">commit</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to commit a modify lock.  <a href="#ac36f33d35e7fd2923474f449e5c936e0"></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="a00038.html#a00f128ae4b96d7895c8a446e829abd5c">exclusive</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to convert lock to exclusive mode.  <a href="#a00f128ae4b96d7895c8a446e829abd5c"></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="a00038.html#a414b4a687d9323562bd6cd251d119165">modify</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to modify lock.  <a href="#a414b4a687d9323562bd6cd251d119165"></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="a00038.html#ad4c0de381629b9170cbdf8132d2d3a70">release</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a shared lock.  <a href="#ad4c0de381629b9170cbdf8132d2d3a70"></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="a00038.html#a8e837361f4ecdef09b86ff51e14c0249">share</a> (<a class="el" href="a00038.html">ConditionalLock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to convert lock to shared access.  <a href="#a8e837361f4ecdef09b86ff51e14c0249"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a4a6286ab13f8c083f8250ba380c8f540">Exclusive</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert object to an exclusive lock.  <a href="#a4a6286ab13f8c083f8250ba380c8f540"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5fd90ddac55f7f11588cfd331f3e986"></a><!-- doxytag: member="ucommon::ConditionalLock::getContext" ref="ac5fd90ddac55f7f11588cfd331f3e986" args="(void)" -->
Context *&nbsp;</td><td class="memItemRight" valign="bottom"><b>getContext</b> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#a7e57ad8ee1a0c49d4a418505a19395b6">Share</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Share the lock with other referencers.  <a href="#a7e57ad8ee1a0c49d4a418505a19395b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace03b18374d47f54693aa81a7ba1f182"></a><!-- doxytag: member="ucommon::ConditionalLock::Shlock" ref="ace03b18374d47f54693aa81a7ba1f182" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ace03b18374d47f54693aa81a7ba1f182">Shlock</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Protocol interface to share lock the object. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af85c42ede226e6f7f74f1524c649e5d8"></a><!-- doxytag: member="ucommon::ConditionalLock::Unlock" ref="af85c42ede226e6f7f74f1524c649e5d8" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#af85c42ede226e6f7f74f1524c649e5d8">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="a16d53b3f9bb2375a5d56cdd600fcc2ac"></a><!-- doxytag: member="ucommon::ConditionalLock::contexts" ref="a16d53b3f9bb2375a5d56cdd600fcc2ac" args="" -->
<a class="el" href="a00067.html">LinkedObject</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>contexts</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>An optimized and convertable shared lock. </p>
<p>This is a form of read/write lock that has been optimized, particularly for shared access. Support for scheduling access around writer starvation is also included. The other benefits over traditional read/write locks is that the code is a little lighter, and read (shared) locks can be converted to exclusive (write) locks to perform brief modify operations and then returned to read locks, rather than having to release and re-aquire locks to change mode. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00806">806</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7428dc9f2df3b5c4685504bf2d4be6f3"></a><!-- doxytag: member="ucommon::ConditionalLock::access" ref="a7428dc9f2df3b5c4685504bf2d4be6f3" args="(ConditionalLock &amp;lock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucommon::ConditionalLock::access </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00038.html">ConditionalLock</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>lock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function to aqcuire a shared 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>lock</em>&nbsp;</td><td>to share. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00903">903</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="a00038_a7428dc9f2df3b5c4685504bf2d4be6f3_cgraph.png" border="0" usemap="#a00038_a7428dc9f2df3b5c4685504bf2d4be6f3_cgraph_map" alt=""></div>
<map name="a00038_a7428dc9f2df3b5c4685504bf2d4be6f3_cgraph_map" id="a00038_a7428dc9f2df3b5c4685504bf2d4be6f3_cgraph">
<area shape="rect" id="node3" href="a00038.html#a6c50babda6e4c056be90b754738d2d5d" title="Acquire access (shared read) lock." alt="" coords="399,5,740,32"/></map>
</div>
</p>

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

<p>Convenience function to commit a modify 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>lock</em>&nbsp;</td><td>to commit. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00889">889</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="a00038_ac36f33d35e7fd2923474f449e5c936e0_cgraph.png" border="0" usemap="#a00038_ac36f33d35e7fd2923474f449e5c936e0_cgraph_map" alt=""></div>
<map name="a00038_ac36f33d35e7fd2923474f449e5c936e0_cgraph_map" id="a00038_ac36f33d35e7fd2923474f449e5c936e0_cgraph">
<area shape="rect" id="node3" href="a00038.html#aa8b1287c294c8abc9c30000e9d5b9052" title="Commit changes / release a modify lock." alt="" coords="399,5,740,32"/></map>
</div>
</p>

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

<p>Convenience function to convert lock to exclusive mode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>to convert. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00910">910</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="a00038_a00f128ae4b96d7895c8a446e829abd5c_cgraph.png" border="0" usemap="#a00038_a00f128ae4b96d7895c8a446e829abd5c_cgraph_map" alt=""></div>
<map name="a00038_a00f128ae4b96d7895c8a446e829abd5c_cgraph_map" id="a00038_a00f128ae4b96d7895c8a446e829abd5c_cgraph">
<area shape="rect" id="node3" href="a00038.html#a719bfdd193be78ad51d5b034822fbb2f" title="Convert read lock into exclusive (write/modify) access." alt="" coords="428,5,799,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a719bfdd193be78ad51d5b034822fbb2f"></a><!-- doxytag: member="ucommon::ConditionalLock::exclusive" ref="a719bfdd193be78ad51d5b034822fbb2f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::ConditionalLock::exclusive </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>Convert read lock into exclusive (write/modify) access. </p>
<p>Schedule when other readers sharing. </p>

</div>
</div>
<a class="anchor" id="a4a6286ab13f8c083f8250ba380c8f540"></a><!-- doxytag: member="ucommon::ConditionalLock::Exclusive" ref="a4a6286ab13f8c083f8250ba380c8f540" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::ConditionalLock::Exclusive </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert object to an exclusive lock. </p>
<p>Many of our shared locking objects such as the "conditional lock" support the ability to switch between shared and exclusive locking modes. This derived protocol member allows one to temporarily assert exclusive locking when tied to such methods. </p>

<p>Reimplemented from <a class="el" href="a00128.html#af0abe5b2d57ac6ccf98cdc151c61915a">ucommon::SharedProtocol</a>.</p>

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

<p>Convenience function to modify 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>lock</em>&nbsp;</td><td>to acquire in write exclusive mode. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00882">882</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="a00038_a414b4a687d9323562bd6cd251d119165_cgraph.png" border="0" usemap="#a00038_a414b4a687d9323562bd6cd251d119165_cgraph_map" alt=""></div>
<map name="a00038_a414b4a687d9323562bd6cd251d119165_cgraph_map" id="a00038_a414b4a687d9323562bd6cd251d119165_cgraph">
<area shape="rect" id="node3" href="a00038.html#a3d3a37cc1d24d1326deb9755ce0f6171" title="Acquire write (exclusive modify) lock." alt="" coords="399,5,740,32"/></map>
</div>
</p>

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

<p>Convenience function to release a shared 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>lock</em>&nbsp;</td><td>to release. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00896">896</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="a00038_ad4c0de381629b9170cbdf8132d2d3a70_cgraph.png" border="0" usemap="#a00038_ad4c0de381629b9170cbdf8132d2d3a70_cgraph_map" alt=""></div>
<map name="a00038_ad4c0de381629b9170cbdf8132d2d3a70_cgraph_map" id="a00038_ad4c0de381629b9170cbdf8132d2d3a70_cgraph">
<area shape="rect" id="node3" href="a00038.html#ae9a0b040d4d65870ac7d67d2b96cea50" title="Release a shared lock." alt="" coords="405,5,757,32"/></map>
</div>
</p>

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

<p>Convenience function to convert lock to shared access. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>to convert. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l00917">917</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="a00038_a8e837361f4ecdef09b86ff51e14c0249_cgraph.png" border="0" usemap="#a00038_a8e837361f4ecdef09b86ff51e14c0249_cgraph_map" alt=""></div>
<map name="a00038_a8e837361f4ecdef09b86ff51e14c0249_cgraph_map" id="a00038_a8e837361f4ecdef09b86ff51e14c0249_cgraph">
<area shape="rect" id="node3" href="a00038.html#a93aa50cae673c104a3436940de1e63b8" title="Return an exclusive access lock back to share mode." alt="" coords="388,5,719,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a7e57ad8ee1a0c49d4a418505a19395b6"></a><!-- doxytag: member="ucommon::ConditionalLock::Share" ref="a7e57ad8ee1a0c49d4a418505a19395b6" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::ConditionalLock::Share </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Share the lock with other referencers. </p>
<p>Many of our shared locking objects support the ability to switch between shared and exclusive mode. This derived protocol member allows one to restore the lock to shared mode after it has been made exclusive. </p>

<p>Reimplemented from <a class="el" href="a00128.html#ae3758b5d521a35cd283d4f6329564f9f">ucommon::SharedProtocol</a>.</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:33 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>