Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b293cf61b174f6cb974e48c9096dc9b3 > files > 246

lib64commoncpp-devel-1.8.1-7.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.5"/>
<title>GNU CommonC++: ost::Mutex 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">GNU CommonC++
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;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>
      <li><a href="examples.html"><span>Examples</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="namespaceost.html">ost</a></li><li class="navelem"><a class="el" href="classost_1_1_mutex.html">Mutex</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classost_1_1_mutex-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ost::Mutex Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> class is used to protect a section of code so that at any given time only a single thread can perform the protected operation.  
 <a href="classost_1_1_mutex.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="thread_8h_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ost::Mutex:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classost_1_1_mutex.png" usemap="#ost::Mutex_map" alt=""/>
  <map id="ost::Mutex_map" name="ost::Mutex_map">
<area href="classost_1_1_map_table.html" title="A map table allows for entities to be mapped (hash index) onto it. " alt="ost::MapTable" shape="rect" coords="146,56,282,80"/>
<area href="classost_1_1_mutex_counter.html" title="The Mutex Counter is a counter variable which can safely be incremented or decremented by multiple th..." alt="ost::MutexCounter" shape="rect" coords="146,112,282,136"/>
<area href="classost_1_1_random_file.html" title="The purpose of this class is to define a base class for low level random file access that is portable..." alt="ost::RandomFile" shape="rect" coords="146,168,282,192"/>
<area href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore. " alt="ost::Runlist" shape="rect" coords="146,224,282,248"/>
<area href="classost_1_1_serial_service.html" title="The SerialService is a thead service object that is meant to service attached serial ports..." alt="ost::SerialService" shape="rect" coords="146,280,282,304"/>
<area href="classost_1_1_shared_mem_pager.html" title="The shared mempager uses a mutex to protect key access methods. " alt="ost::SharedMemPager" shape="rect" coords="146,336,282,360"/>
<area href="classost_1_1_socket_service.html" title="The SocketService is a thread pool object that is meant to service attached socket ports..." alt="ost::SocketService" shape="rect" coords="146,392,282,416"/>
<area href="classost_1_1_thread_queue.html" title="Somewhat generic queue processing class to establish a producer consumer queue. " alt="ost::ThreadQueue" shape="rect" coords="146,448,282,472"/>
</map>
 </div></div>
<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:a22e6ce5d9d8d209dac70e39310459202"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#a22e6ce5d9d8d209dac70e39310459202">Mutex</a> (const char *name=NULL)</td></tr>
<tr class="memdesc:a22e6ce5d9d8d209dac70e39310459202"><td class="mdescLeft">&#160;</td><td class="mdescRight">The mutex is always initialized as a recursive entity.  <a href="#a22e6ce5d9d8d209dac70e39310459202">More...</a><br/></td></tr>
<tr class="separator:a22e6ce5d9d8d209dac70e39310459202"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ccc1c2e7278d8adc47fd728706c33a8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#a5ccc1c2e7278d8adc47fd728706c33a8">~Mutex</a> ()</td></tr>
<tr class="memdesc:a5ccc1c2e7278d8adc47fd728706c33a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroying the mutex removes any system resources associated with it.  <a href="#a5ccc1c2e7278d8adc47fd728706c33a8">More...</a><br/></td></tr>
<tr class="separator:a5ccc1c2e7278d8adc47fd728706c33a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed8b05b63f9cdd2c9ca1f92081b1a8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#abed8b05b63f9cdd2c9ca1f92081b1a8a">nameMutex</a> (const char *name)</td></tr>
<tr class="memdesc:abed8b05b63f9cdd2c9ca1f92081b1a8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable setting of mutex name for deadlock debug.  <a href="#abed8b05b63f9cdd2c9ca1f92081b1a8a">More...</a><br/></td></tr>
<tr class="separator:abed8b05b63f9cdd2c9ca1f92081b1a8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc1471d0c2114e5c49e1fe7152448378"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#adc1471d0c2114e5c49e1fe7152448378">enterMutex</a> (void)</td></tr>
<tr class="memdesc:adc1471d0c2114e5c49e1fe7152448378"><td class="mdescLeft">&#160;</td><td class="mdescRight">Entering a <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> locks the mutex for the current thread.  <a href="#adc1471d0c2114e5c49e1fe7152448378">More...</a><br/></td></tr>
<tr class="separator:adc1471d0c2114e5c49e1fe7152448378"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecb516325583e432bf2bf7e4b565f6f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#aecb516325583e432bf2bf7e4b565f6f6">enter</a> (void)</td></tr>
<tr class="memdesc:aecb516325583e432bf2bf7e4b565f6f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Future abi will use enter/leave/test members.  <a href="#aecb516325583e432bf2bf7e4b565f6f6">More...</a><br/></td></tr>
<tr class="separator:aecb516325583e432bf2bf7e4b565f6f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6aaecac9c95d31a5862014d7f1afe73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#ab6aaecac9c95d31a5862014d7f1afe73">leave</a> (void)</td></tr>
<tr class="memdesc:ab6aaecac9c95d31a5862014d7f1afe73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Future abi will use enter/leave/test members.  <a href="#ab6aaecac9c95d31a5862014d7f1afe73">More...</a><br/></td></tr>
<tr class="separator:ab6aaecac9c95d31a5862014d7f1afe73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1ff5454b2c9b55790c4bf33f751704c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#ac1ff5454b2c9b55790c4bf33f751704c">test</a> (void)</td></tr>
<tr class="memdesc:ac1ff5454b2c9b55790c4bf33f751704c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Future abi will use enter/leave/test members.  <a href="#ac1ff5454b2c9b55790c4bf33f751704c">More...</a><br/></td></tr>
<tr class="separator:ac1ff5454b2c9b55790c4bf33f751704c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa46b490ac92017ef89980b0020bff8c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#aa46b490ac92017ef89980b0020bff8c0">tryEnterMutex</a> (void)</td></tr>
<tr class="memdesc:aa46b490ac92017ef89980b0020bff8c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tries to lock the mutex for the current thread.  <a href="#aa46b490ac92017ef89980b0020bff8c0">More...</a><br/></td></tr>
<tr class="separator:aa46b490ac92017ef89980b0020bff8c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a403208d275c4c7b8087a40259b0cb0f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#a403208d275c4c7b8087a40259b0cb0f3">leaveMutex</a> (void)</td></tr>
<tr class="memdesc:a403208d275c4c7b8087a40259b0cb0f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Leaving a mutex frees that mutex for use by another thread.  <a href="#a403208d275c4c7b8087a40259b0cb0f3">More...</a><br/></td></tr>
<tr class="separator:a403208d275c4c7b8087a40259b0cb0f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a83b66f786e344b5192a3993d319aa735"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_mutex.html#a83b66f786e344b5192a3993d319aa735">setDebug</a> (bool mode)</td></tr>
<tr class="memdesc:a83b66f786e344b5192a3993d319aa735"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable deadlock debugging.  <a href="#a83b66f786e344b5192a3993d319aa735">More...</a><br/></td></tr>
<tr class="separator:a83b66f786e344b5192a3993d319aa735"><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>The <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> class is used to protect a section of code so that at any given time only a single thread can perform the protected operation. </p>
<p>The <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> can be used as a base class to protect access in a derived class. When used in this manner, the ENTER_CRITICAL and LEAVE_CRITICAL macros can be used to specify when code written for the derived class needs to be protected by the default <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> of the derived class, and hence is presumed to be 'thread safe' from multiple instance execution. One of the most basic Common C++ synchronization object is the <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> class. A <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> only allows one thread to continue execution at a given time over a specific section of code. <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a>'s have a enter and leave method; only one thread can continue from the Enter until the Leave is called. The next thread waiting can then get through. <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a>'s are also known as "CRITICAL SECTIONS" in win32-speak.</p>
<p>The <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> is always recursive in that if the same thread invokes the same mutex lock multiple times, it must release it multiple times. This allows a function to call another function which also happens to use the same mutex lock when called directly. This was deemed essential because a mutex might be used to block individual file requests in say, a database, but the same mutex might be needed to block a whole series of database updates that compose a "transaction" for one thread to complete together without having to write alternate non-locking member functions to invoke for each part of a transaction.</p>
<p>Strangely enough, the original pthread draft standard does not directly support recursive mutexes. In fact this is the most common "NP" extension for most pthread implementations. Common C++ emulates recursive mutex behavior when the target platform does not directly support it.</p>
<p>In addition to the <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a>, Common C++ supports a rwlock class. This implements the X/Open recommended "rwlock". On systems which do not support rwlock's, the behavior is emulated with a <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a>; however, the advantage of a rwlock over a mutex is then entirely lost. There has been some suggested clever hacks for "emulating" the behavior of a rwlock with a pair of mutexes and a semaphore, and one of these will be adapted for Common C++ in the future for platforms that do not support rwlock's directly.</p>
<dl class="section author"><dt>Author</dt><dd>David Sugar <a href="#" onclick="location.href='mai'+'lto:'+'dyf'+'et'+'@os'+'te'+'l.c'+'om'; return false;">dyfet<span style="display: none;">.nosp@m.</span>@ost<span style="display: none;">.nosp@m.</span>el.co<span style="display: none;">.nosp@m.</span>m</a> <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> lock for protected access. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tcpservice_8cpp-example.html#_a0">tcpservice.cpp</a>, and <a class="el" href="tcpthread_8cpp-example.html#_a4">tcpthread.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a22e6ce5d9d8d209dac70e39310459202"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ost::Mutex::Mutex </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The mutex is always initialized as a recursive entity. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>of mutex for optional deadlock detection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5ccc1c2e7278d8adc47fd728706c33a8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual ost::Mutex::~Mutex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destroying the mutex removes any system resources associated with it. </p>
<p>If a mutex lock is currently in place, it is presumed to terminate when the <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> is destroyed. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aecb516325583e432bf2bf7e4b565f6f6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Mutex::enter </td>
          <td>(</td>
          <td class="paramtype">void&#160;</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>Future abi will use enter/leave/test members. </p>

</div>
</div>
<a class="anchor" id="adc1471d0c2114e5c49e1fe7152448378"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Mutex::enterMutex </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Entering a <a class="el" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only a single thread c...">Mutex</a> locks the mutex for the current thread. </p>
<p>This also can be done using the ENTER_CRITICAL macro or by using the ++ operator on a mutex.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classost_1_1_mutex.html#a403208d275c4c7b8087a40259b0cb0f3" title="Leaving a mutex frees that mutex for use by another thread. ">leaveMutex</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab6aaecac9c95d31a5862014d7f1afe73"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Mutex::leave </td>
          <td>(</td>
          <td class="paramtype">void&#160;</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>Future abi will use enter/leave/test members. </p>

</div>
</div>
<a class="anchor" id="a403208d275c4c7b8087a40259b0cb0f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Mutex::leaveMutex </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Leaving a mutex frees that mutex for use by another thread. </p>
<p>If the mutex has been entered (invoked) multiple times (recursivily) by the same thread, then it will need to be exited the same number of instances before it is free for re-use. This operation can also be done using the LEAVE_CRITICAL macro or by the &ndash; operator on a mutex.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classost_1_1_mutex.html#adc1471d0c2114e5c49e1fe7152448378" title="Entering a Mutex locks the mutex for the current thread. ">enterMutex</a> </dd></dl>

</div>
</div>
<a class="anchor" id="abed8b05b63f9cdd2c9ca1f92081b1a8a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Mutex::nameMutex </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</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>Enable setting of mutex name for deadlock debug. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>for mutex. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a83b66f786e344b5192a3993d319aa735"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Mutex::setDebug </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable or disable deadlock debugging. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>debug mode. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac1ff5454b2c9b55790c4bf33f751704c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Mutex::test </td>
          <td>(</td>
          <td class="paramtype">void&#160;</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>Future abi will use enter/leave/test members. </p>
<dl class="section return"><dt>Returns</dt><dd>true if entered. </dd></dl>

</div>
</div>
<a class="anchor" id="aa46b490ac92017ef89980b0020bff8c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Mutex::tryEnterMutex </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tries to lock the mutex for the current thread. </p>
<p>Behaves like <a class="el" href="classost_1_1_mutex.html#adc1471d0c2114e5c49e1fe7152448378" title="Entering a Mutex locks the mutex for the current thread. ">enterMutex</a> , except that it doesn't block the calling thread if the mutex is already locked by another thread.</p>
<dl class="section return"><dt>Returns</dt><dd>true if locking the mutex was succesful otherwise false</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classost_1_1_mutex.html#adc1471d0c2114e5c49e1fe7152448378" title="Entering a Mutex locks the mutex for the current thread. ">enterMutex</a> </dd>
<dd>
<a class="el" href="classost_1_1_mutex.html#a403208d275c4c7b8087a40259b0cb0f3" title="Leaving a mutex frees that mutex for use by another thread. ">leaveMutex</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="thread_8h_source.html">thread.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 17 2013 23:24:58 for GNU CommonC++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>