| <!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_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="a00267.html">tbb</a>::<a class="el" href="a00182.html">queuing_mutex</a>::<a class="el" href="a00183.html">scoped_lock</a></div> |
| <h1>tbb::queuing_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_mutex::scoped_lock" -->The scoped locking pattern. |
| <a href="#_details">More...</a> |
| <p> |
| <code>#include <<a class="el" href="a00420.html">queuing_mutex.h</a>></code> |
| <p> |
| <a href="a00055.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="a00183.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex. <a href="#db0fa3967491014572e24d6607bdc971"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b51ef972f5618ac17caadb58841ab6d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="9b51ef972f5618ac17caadb58841ab6d" args="(queuing_mutex &m)" --> |
| </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00182.html">queuing_mutex</a> &m)</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="ac2c576a93570957d694192a5f491443"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::~scoped_lock" ref="ac2c576a93570957d694192a5f491443" args="()" --> |
| </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#ac2c576a93570957d694192a5f491443">~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="533e4fc8355ee321206a0609c42d909d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::acquire" ref="533e4fc8355ee321206a0609c42d909d" args="(queuing_mutex &m)" --> |
| void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00182.html">queuing_mutex</a> &m)</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="e5a014fb817599386a87170cf2cf51a9"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::try_acquire" ref="e5a014fb817599386a87170cf2cf51a9" args="(queuing_mutex &m)" --> |
| bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00182.html">queuing_mutex</a> &m)</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="3bf2b8c87ff22115be9b2eac179f2d30"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::release" ref="3bf2b8c87ff22115be9b2eac179f2d30" args="()" --> |
| void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <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="db0fa3967491014572e24d6607bdc971"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="db0fa3967491014572e24d6607bdc971" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">tbb::queuing_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>The documentation for this class was generated from the following file:<ul> |
| <li><a class="el" href="a00420.html">queuing_mutex.h</a></ul> |
| <hr> |
| <p></p> |
| Copyright © 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. |