You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>tbb::queuing_rw_mutex::scoped_lock Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="a00428.html">tbb</a>::<a class="el" href="a00328.html">queuing_rw_mutex</a>::<a class="el" href="a00329.html">scoped_lock</a></div> <h1>tbb::queuing_rw_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_rw_mutex::scoped_lock" -->The scoped locking pattern. <a href="#_details">More...</a> <p> <code>#include <queuing_rw_mutex.h></code> <p> <a href="a00115.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex. <a href="#c62e365be7bcbba091c9ea7454a4d22c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbb8798792d3aebb136c46fc63d2529e"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="fbb8798792d3aebb136c46fc63d2529e" args="(queuing_rw_mutex &m, bool write=true)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a> (<a class="el" href="a00328.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32c7d67a660d23ebbaab1a1d2826d31a"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::~scoped_lock" ref="32c7d67a660d23ebbaab1a1d2826d31a" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8dd5ab8686e76de21587544dbb681e0"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::acquire" ref="a8dd5ab8686e76de21587544dbb681e0" args="(queuing_rw_mutex &m, bool write=true)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a> (<a class="el" href="a00328.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e4ff6c9ec2fee6682f95290d1f42baa"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::try_acquire" ref="2e4ff6c9ec2fee6682f95290d1f42baa" args="(queuing_rw_mutex &m, bool write=true)" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a> (<a class="el" href="a00328.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex if free (i.e. non-blocking). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67ae221109ddc69510ab593874e435d4"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::release" ref="67ae221109ddc69510ab593874e435d4" args="()" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#67ae221109ddc69510ab593874e435d4">release</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer. <a href="#11ba1da4a722c9e6f73339a52c487e82"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d2f93edf7b15ec4bcee138823220c52"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader" ref="0d2f93edf7b15ec4bcee138823220c52" args="()" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00329.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Downgrade writer to become a reader. <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The scoped locking pattern. <p> It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="c62e365be7bcbba091c9ea7454a4d22c"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="c62e365be7bcbba091c9ea7454a4d22c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc">
<p> Construct lock that has not acquired a mutex. <p> Equivalent to zero-initialization of *this. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="11ba1da4a722c9e6f73339a52c487e82"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer" ref="11ba1da4a722c9e6f73339a52c487e82" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc">
<p> Upgrade reader to become a writer. <p> Returns whether the upgrade happened without releasing and re-acquiring the lock </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>queuing_rw_mutex.h</ul> <hr> <p></p> Copyright © 2005-2013 Intel Corporation. All Rights Reserved. <p></p> Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries. <p></p> * Other names and brands may be claimed as the property of others.
|