Sophie

Sophie

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

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::ReadLock 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_read_lock.html">ReadLock</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classost_1_1_read_lock-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ost::ReadLock Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="classost_1_1_read_lock.html" title="The ReadLock class is used to protect a section of code through a ThreadLock for &quot;read&quot; access to the...">ReadLock</a> class is used to protect a section of code through a <a class="el" href="classost_1_1_thread_lock.html" title="The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have ...">ThreadLock</a> for "read" access to the member function.  
 <a href="classost_1_1_read_lock.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="thread_8h_source.html">thread.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:a05b7c96baf6695c580871d0aaf01c149"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_read_lock.html#a05b7c96baf6695c580871d0aaf01c149">ReadLock</a> (<a class="el" href="classost_1_1_thread_lock.html">ThreadLock</a> &amp;_tl)</td></tr>
<tr class="memdesc:a05b7c96baf6695c580871d0aaf01c149"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for read access.  <a href="#a05b7c96baf6695c580871d0aaf01c149">More...</a><br/></td></tr>
<tr class="separator:a05b7c96baf6695c580871d0aaf01c149"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a166b6a55b9fa7072be782b7eccf30a98"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_read_lock.html#a166b6a55b9fa7072be782b7eccf30a98">~ReadLock</a> ()</td></tr>
<tr class="memdesc:a166b6a55b9fa7072be782b7eccf30a98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post the semaphore automatically.  <a href="#a166b6a55b9fa7072be782b7eccf30a98">More...</a><br/></td></tr>
<tr class="separator:a166b6a55b9fa7072be782b7eccf30a98"><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_read_lock.html" title="The ReadLock class is used to protect a section of code through a ThreadLock for &quot;read&quot; access to the...">ReadLock</a> class is used to protect a section of code through a <a class="el" href="classost_1_1_thread_lock.html" title="The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have ...">ThreadLock</a> for "read" access to the member function. </p>
<p>The <a class="el" href="classost_1_1_thread_lock.html" title="The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have ...">ThreadLock</a> is automatically released when the object falls out of scope.</p>
<p>A common use is</p>
<p>void func_to_protect() { <a class="el" href="classost_1_1_read_lock.html" title="The ReadLock class is used to protect a section of code through a ThreadLock for &quot;read&quot; access to the...">ReadLock</a> lock(threadlock); ... operation ... }</p>
<p>NOTE: do not declare variable as "ReadLock (threadlock)", the mutex will be released at statement end.</p>
<dl class="section author"><dt>Author</dt><dd>David Sugar <a href="#" onclick="location.href='mai'+'lto:'+'dyf'+'et'+'@gn'+'u.'+'org'; return false;">dyfet<span style="display: none;">.nosp@m.</span>@gnu<span style="display: none;">.nosp@m.</span>.org</a> Read mode automatic locker for protected access. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a05b7c96baf6695c580871d0aaf01c149"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ost::ReadLock::ReadLock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread_lock.html">ThreadLock</a> &amp;&#160;</td>
          <td class="paramname"><em>_tl</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>Wait for read access. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_tl</td><td>reference to lock to aquire. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a166b6a55b9fa7072be782b7eccf30a98"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ost::ReadLock::~ReadLock </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>Post the semaphore automatically. </p>

</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>