blob: 6f72dddda42557b69ce324092d75b53ae5df7b1c [file] [log] [blame]
<!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::recursive_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&nbsp;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&nbsp;Pages</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="a00267.html">tbb</a>::<a class="el" href="a00189.html">recursive_mutex</a>::<a class="el" href="a00190.html">scoped_lock</a></div>
<h1>tbb::recursive_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::recursive_mutex::scoped_lock" -->The scoped locking pattern.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="a00423.html">recursive_mutex.h</a>&gt;</code>
<p>
<a href="a00062.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"><a class="anchor" name="d82d4d36fbf9727a493d26ae50855fe7"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="d82d4d36fbf9727a493d26ae50855fe7" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00189.html">recursive_mutex</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dec17713c4c1321ac8fec66816d0c602"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="dec17713c4c1321ac8fec66816d0c602" args="(recursive_mutex &amp;mutex)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a> (<a class="el" href="a00189.html">recursive_mutex</a> &amp;<a class="el" href="a00172.html">mutex</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="c1197ffb8f3cd9d4fed71d7e06265b7c"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::~scoped_lock" ref="c1197ffb8f3cd9d4fed71d7e06265b7c" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="7fb04da37cccf8c99b1f9102d9074f9a"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::acquire" ref="7fb04da37cccf8c99b1f9102d9074f9a" args="(recursive_mutex &amp;mutex)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a> (<a class="el" href="a00189.html">recursive_mutex</a> &amp;<a class="el" href="a00172.html">mutex</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="36bfc3e93e3ef6340abef4901444d340"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::try_acquire" ref="36bfc3e93e3ef6340abef4901444d340" args="(recursive_mutex &amp;mutex)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a> (<a class="el" href="a00189.html">recursive_mutex</a> &amp;<a class="el" href="a00172.html">mutex</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00189.html">recursive_mutex</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac480ea0e9d5ea0345a67d57008b6263"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::release" ref="ac480ea0e9d5ea0345a67d57008b6263" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00190.html#ac480ea0e9d5ea0345a67d57008b6263">release</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release lock. <br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="459818b78a3e9985dc5a9d5638b6593e"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::recursive_mutex" ref="459818b78a3e9985dc5a9d5638b6593e" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>recursive_mutex</b></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>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00423.html">recursive_mutex.h</a></ul>
<hr>
<p></p>
Copyright &copy; 2005-2010 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.