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.

94 lines
6.1 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>tbb::queuing_mutex::scoped_lock Class Reference</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. </head><body>
  7. <!-- Generated by Doxygen 1.4.7 -->
  8. <div class="tabs">
  9. <ul>
  10. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  11. <li><a href="modules.html"><span>Modules</span></a></li>
  12. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  13. <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
  14. <li><a href="files.html"><span>Files</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. </ul></div>
  17. <div class="tabs">
  18. <ul>
  19. <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
  20. <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
  21. <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  22. </ul></div>
  23. <div class="nav">
  24. <a class="el" href="a00428.html">tbb</a>::<a class="el" href="a00326.html">queuing_mutex</a>::<a class="el" href="a00327.html">scoped_lock</a></div>
  25. <h1>tbb::queuing_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_mutex::scoped_lock" -->The scoped locking pattern.
  26. <a href="#_details">More...</a>
  27. <p>
  28. <code>#include &lt;queuing_mutex.h&gt;</code>
  29. <p>
  30. <a href="a00113.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
  31. <tr><td></td></tr>
  32. <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
  33. <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</td></tr>
  34. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct lock that has not acquired a mutex. <a href="#db0fa3967491014572e24d6607bdc971"></a><br></td></tr>
  35. <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 &amp;m)" -->
  36. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00326.html">queuing_mutex</a> &amp;m)</td></tr>
  37. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
  38. <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="()" -->
  39. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a> ()</td></tr>
  40. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
  41. <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 &amp;m)" -->
  42. void __TBB_EXPORTED_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00326.html">queuing_mutex</a> &amp;m)</td></tr>
  43. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
  44. <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 &amp;m)" -->
  45. bool __TBB_EXPORTED_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00326.html">queuing_mutex</a> &amp;m)</td></tr>
  46. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire lock on given mutex if free (i.e. non-blocking). <br></td></tr>
  47. <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="()" -->
  48. void __TBB_EXPORTED_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00327.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr>
  49. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release lock. <br></td></tr>
  50. </table>
  51. <hr><a name="_details"></a><h2>Detailed Description</h2>
  52. The scoped locking pattern.
  53. <p>
  54. It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.
  55. <p>
  56. <hr><h2>Constructor &amp; Destructor Documentation</h2>
  57. <a class="anchor" name="db0fa3967491014572e24d6607bdc971"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="db0fa3967491014572e24d6607bdc971" args="()" -->
  58. <div class="memitem">
  59. <div class="memproto">
  60. <table class="memname">
  61. <tr>
  62. <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock </td>
  63. <td>(</td>
  64. <td class="paramname"> </td>
  65. <td>&nbsp;)&nbsp;</td>
  66. <td width="100%"><code> [inline]</code></td>
  67. </tr>
  68. </table>
  69. </div>
  70. <div class="memdoc">
  71. <p>
  72. Construct lock that has not acquired a mutex.
  73. <p>
  74. Equivalent to zero-initialization of *this.
  75. </div>
  76. </div><p>
  77. <hr>The documentation for this class was generated from the following file:<ul>
  78. <li>queuing_mutex.h</ul>
  79. <hr>
  80. <p></p>
  81. Copyright &copy; 2005-2013 Intel Corporation. All Rights Reserved.
  82. <p></p>
  83. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  84. registered trademarks or trademarks of Intel Corporation or its
  85. subsidiaries in the United States and other countries.
  86. <p></p>
  87. * Other names and brands may be claimed as the property of others.