Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ba6e5e1a033bd8535c43a771ce407926 > files > 253

lib64cxx-gtk-utils2.2-devel-2.2.3-2.mga4.x86_64.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>c++-gtk-utils: Cgu::Thread::RecMutex::TrackLock Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">c++-gtk-utils
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</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&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceCgu.html">Cgu</a></li><li class="navelem"><a class="el" href="namespaceCgu_1_1Thread.html">Thread</a></li><li class="navelem"><a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a></li><li class="navelem"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">TrackLock</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Cgu::Thread::RecMutex::TrackLock Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A scoped locking class for exception safe <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html" title="A wrapper class for pthread mutexes which provides a recursive mutex. ">RecMutex</a> locking which tracks the status of its mutex.  
 <a href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="mutex_8h_source.html">c++-gtk-utils/mutex.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a71d6f8d9c7b23e31296d8e0e256e5d79"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a71d6f8d9c7b23e31296d8e0e256e5d79">TrackLock</a> (const <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a> &amp;)=delete</td></tr>
<tr class="separator:a71d6f8d9c7b23e31296d8e0e256e5d79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e2d07ed7f4423274030f547599ab148"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a8e2d07ed7f4423274030f547599ab148">operator=</a> (const <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a> &amp;)=delete</td></tr>
<tr class="separator:a8e2d07ed7f4423274030f547599ab148"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20df639436a75f284a71b2c30a8c70d9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a20df639436a75f284a71b2c30a8c70d9">lock</a> () noexcept</td></tr>
<tr class="separator:a20df639436a75f284a71b2c30a8c70d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a137d7ef6bbc8a41caab06c4121c63188"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a137d7ef6bbc8a41caab06c4121c63188">trylock</a> () noexcept</td></tr>
<tr class="separator:a137d7ef6bbc8a41caab06c4121c63188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe728a5ee849ecf47a07e8100b5658c5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#afe728a5ee849ecf47a07e8100b5658c5">unlock</a> () noexcept</td></tr>
<tr class="separator:afe728a5ee849ecf47a07e8100b5658c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a962638f71025816fa21c24fd9c0c1e9f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a962638f71025816fa21c24fd9c0c1e9f">is_owner</a> () const noexcept</td></tr>
<tr class="separator:a962638f71025816fa21c24fd9c0c1e9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4861e0d3b2b4ff2ab929f625d7a04a6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#aa4861e0d3b2b4ff2ab929f625d7a04a6">TrackLock</a> (<a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;mutex_)</td></tr>
<tr class="separator:aa4861e0d3b2b4ff2ab929f625d7a04a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e1c52a7a2bb5e587018d57f88de7098"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a8e1c52a7a2bb5e587018d57f88de7098">TrackLock</a> (<a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;mutex_, <a class="el" href="namespaceCgu_1_1Thread.html#ae859cc661aefb3465ab878a3f7305910">Locked</a> tag) noexcept</td></tr>
<tr class="separator:a8e1c52a7a2bb5e587018d57f88de7098"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ede554a606ed1c54d9e8e3983257e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a85ede554a606ed1c54d9e8e3983257e6">TrackLock</a> (<a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;mutex_, <a class="el" href="namespaceCgu_1_1Thread.html#a805d60a9ddc5469f5d1cde5451670af7">DeferLock</a> tag) noexcept</td></tr>
<tr class="separator:a85ede554a606ed1c54d9e8e3983257e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76fee554497f6ee56687ef884df14b64"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a76fee554497f6ee56687ef884df14b64">TrackLock</a> ()=delete</td></tr>
<tr class="separator:a76fee554497f6ee56687ef884df14b64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9036a6b1c13604fb0f5d688175cc81c9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a9036a6b1c13604fb0f5d688175cc81c9">~TrackLock</a> ()</td></tr>
<tr class="separator:a9036a6b1c13604fb0f5d688175cc81c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A scoped locking class for exception safe <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html" title="A wrapper class for pthread mutexes which provides a recursive mutex. ">RecMutex</a> locking which tracks the status of its mutex. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCgu_1_1Thread_1_1RecMutex.html" title="A wrapper class for pthread mutexes which provides a recursive mutex. ">Thread::RecMutex</a> <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1Lock.html" title="A scoped locking class for exception safe RecMutex locking. ">Thread::RecMutex::Lock</a> <a class="el" href="classCgu_1_1Thread_1_1Thread.html" title="A class representing a pthread thread. ">Thread::Thread</a></dd></dl>
<p>This class is similar to a <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1Lock.html" title="A scoped locking class for exception safe RecMutex locking. ">RecMutex::Lock</a> object, except that it tracks whether the mutex it manages is locked by the thread creating the <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object with respect to the particular locking operation to be governed by the object (provided that, while the <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object exists, the thread creating it only accesses the mutex with respect that particular operation through that object). This enables <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#afe728a5ee849ecf47a07e8100b5658c5">RecMutex::TrackLock::unlock()</a> to be used without it being followed later by a call to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a20df639436a75f284a71b2c30a8c70d9">RecMutex::TrackLock::lock()</a> or a successful call to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a137d7ef6bbc8a41caab06c4121c63188">RecMutex::TrackLock::trylock()</a>, and also permits locking to be deferred until after construction of the lock object. Note that only one thread may call the methods of any one <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object, including causing its destructor to be invoked. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a71d6f8d9c7b23e31296d8e0e256e5d79"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::TrackLock </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a> &amp;&#160;</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This class cannot be copied. The copy constructor is deleted. </p>

</div>
</div>
<a class="anchor" id="aa4861e0d3b2b4ff2ab929f625d7a04a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::TrackLock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;&#160;</td>
          <td class="paramname"><em>mutex_</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This constructor locks the mutex passed to it. See <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#aff099ea91c91a99f64da45baa8408101">RecMutex::lock()</a> for a description of the outcomes. It is not a cancellation point. It does not throw. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex_</td><td>The mutex to be locked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structCgu_1_1Thread_1_1RecMutexError.html">Cgu::Thread::RecMutexError</a></td><td>Throws this exception if initialization of the mutex fails because the maximum recursive lock count for the particular mutex in question has been reached. Usually this number is at or around INT_MAX so it is not usually useful to check for it except during debugging. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8e1c52a7a2bb5e587018d57f88de7098"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::TrackLock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;&#160;</td>
          <td class="paramname"><em>mutex_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceCgu_1_1Thread.html#ae859cc661aefb3465ab878a3f7305910">Locked</a>&#160;</td>
          <td class="paramname"><em>tag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This constructor takes an already locked mutex (say as a result of <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#a0c2ecf413f26f645dd8ce7498a42ebe6">RecMutex::trylock()</a>), and takes ownership of it. It is not a cancellation point. It does not throw. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex_</td><td>The mutex to be managed by this object. </td></tr>
    <tr><td class="paramname">tag</td><td>Pass the <a class="el" href="namespaceCgu_1_1Thread.html#ae859cc661aefb3465ab878a3f7305910a852f8168e5f00130c64125b059109a35">Cgu::Thread::locked</a> enum tag to this parameter. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a85ede554a606ed1c54d9e8e3983257e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::TrackLock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCgu_1_1Thread_1_1RecMutex.html">RecMutex</a> &amp;&#160;</td>
          <td class="paramname"><em>mutex_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceCgu_1_1Thread.html#a805d60a9ddc5469f5d1cde5451670af7">DeferLock</a>&#160;</td>
          <td class="paramname"><em>tag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This constructor defers locking of the mutex (and so taking ownership of it) until an explicit call to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a20df639436a75f284a71b2c30a8c70d9">lock()</a> or <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a137d7ef6bbc8a41caab06c4121c63188">trylock()</a> is made. It is not a cancellation point. It does not throw. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex_</td><td>The mutex to be managed by this object. </td></tr>
    <tr><td class="paramname">tag</td><td>Pass the <a class="el" href="namespaceCgu_1_1Thread.html#a805d60a9ddc5469f5d1cde5451670af7aeca263f786f779ee077c1880c8627546">Cgu::Thread::defer</a> enum tag to this parameter. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a76fee554497f6ee56687ef884df14b64"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::TrackLock </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This class requires initialisation with a <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html" title="A wrapper class for pthread mutexes which provides a recursive mutex. ">RecMutex</a>. The default constructor is deleted. </p>

</div>
</div>
<a class="anchor" id="a9036a6b1c13604fb0f5d688175cc81c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Cgu::Thread::RecMutex::TrackLock::~TrackLock </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The destructor unlocks the managed mutex if it is owned by this <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object. See <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#a8addb58c320b88b7afd84504cbe911c0">RecMutex::unlock()</a> for a description of the outcomes if it is so owned. It is not a cancellation point. It does not throw. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a962638f71025816fa21c24fd9c0c1e9f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Cgu::Thread::RecMutex::TrackLock::is_owner </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Indicates whether the mutex managed by this <a class="el" href="classCgu_1_1Thread_1_1Mutex_1_1TrackLock.html" title="A scoped locking class for exception safe Mutex locking which tracks the status of its mutex...">Mutex::TrackLock</a> object is locked by it (whether originally or recursively) and so owned by it. It does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the mutex is owned by this object, otherwise false. </dd></dl>

</div>
</div>
<a class="anchor" id="a20df639436a75f284a71b2c30a8c70d9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Cgu::Thread::RecMutex::TrackLock::lock </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This calls <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#aff099ea91c91a99f64da45baa8408101">RecMutex::lock()</a>, and so locks the mutex and acquires ownership. It blocks if the mutex is already locked until the mutex becomes free, unless the calling thread already holds the lock, in which case it increments the lock count and returns immediately. This method should normally only be called if a previous call has been made to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#afe728a5ee849ecf47a07e8100b5658c5">RecMutex::TrackLock::unlock()</a> or this <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object has been constructed with the <a class="el" href="namespaceCgu_1_1Thread.html#a805d60a9ddc5469f5d1cde5451670af7aeca263f786f779ee077c1880c8627546">Thread::defer</a> enum tag. It is not a cancellation point. It does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, otherwise the pthread mutex error number. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>With this library implementation, the only pthread error number which could be returned by this method is EAGAIN, which it would do if the maximum recursive lock count for the particular mutex in question has been reached. Usually this number is at or around INT_MAX and hence the return value is usually not worth checking for except during debugging. </dd></dl>

</div>
</div>
<a class="anchor" id="a8e2d07ed7f4423274030f547599ab148"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a>&amp; Cgu::Thread::RecMutex::TrackLock::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html">RecMutex::TrackLock</a> &amp;&#160;</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This class cannot be copied. The assignment operator is deleted. </p>

</div>
</div>
<a class="anchor" id="a137d7ef6bbc8a41caab06c4121c63188"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Cgu::Thread::RecMutex::TrackLock::trylock </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This calls <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#a0c2ecf413f26f645dd8ce7498a42ebe6">RecMutex::trylock()</a>, and so tries to lock the mutex and acquire ownership, but returns immediately if it is already locked with value EBUSY unless the calling thread already holds the lock, in which case it returns normally and increments the lock count. This method should normally only be called if a previous call has been made to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#afe728a5ee849ecf47a07e8100b5658c5">RecMutex::TrackLock::unlock()</a> or this <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html" title="A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex...">RecMutex::TrackLock</a> object has been constructed with the <a class="el" href="namespaceCgu_1_1Thread.html#a805d60a9ddc5469f5d1cde5451670af7aeca263f786f779ee077c1880c8627546">Thread::defer</a> enum tag. It is not a cancellation point. It does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, otherwise EBUSY or other pthread mutex error number. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>With this library implementation, apart from EBUSY, the only other pthread error number which could be returned by this method is EAGAIN, which it would do if the maximum recursive lock count for the particular mutex in question has been reached. Usually this number is at or around INT_MAX and hence an EAGAIN error return value is usually not worth checking for except during debugging. </dd></dl>

</div>
</div>
<a class="anchor" id="afe728a5ee849ecf47a07e8100b5658c5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Cgu::Thread::RecMutex::TrackLock::unlock </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This calls <a class="el" href="classCgu_1_1Thread_1_1RecMutex.html#a8addb58c320b88b7afd84504cbe911c0">RecMutex::unlock()</a>, and so unlocks a locked mutex owned by the calling thread, or decrements the lock count (if it has been recursively locked). It will cause <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a962638f71025816fa21c24fd9c0c1e9f">is_owner()</a> to return false unless a subsequent call is made to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a20df639436a75f284a71b2c30a8c70d9">lock()</a> or a subsequent successful call is made to <a class="el" href="classCgu_1_1Thread_1_1RecMutex_1_1TrackLock.html#a137d7ef6bbc8a41caab06c4121c63188">trylock()</a>. It is not a cancellation point. It does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, otherwise the pthread mutex error number. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>With this library implementation, the only pthread error number which could be returned by this method is EPERM because the calling thread does not own the particular mutex in question (however POSIX does not require that return value in that case and hence the return value is usually not worth checking for except during debugging). </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="mutex_8h_source.html">mutex.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Sep 16 2013 20:45:32 for c++-gtk-utils by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>