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.

110 lines
7.6 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.4"/>
  7. <title>tbb::mutex::scoped_lock Class Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <!-- end header part -->
  16. <!-- Generated by Doxygen 1.8.4 -->
  17. <div id="navrow1" class="tabs">
  18. <ul class="tablist">
  19. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  20. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  21. <li><a href="modules.html"><span>Modules</span></a></li>
  22. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  23. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  24. <li><a href="files.html"><span>Files</span></a></li>
  25. </ul>
  26. </div>
  27. <div id="navrow2" class="tabs2">
  28. <ul class="tablist">
  29. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  30. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  31. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  32. </ul>
  33. </div>
  34. <div id="nav-path" class="navpath">
  35. <ul>
  36. <li class="navelem"><a class="el" href="a00222.html">tbb</a></li><li class="navelem"><a class="el" href="a00081.html">mutex</a></li><li class="navelem"><a class="el" href="a00116.html">scoped_lock</a></li> </ul>
  37. </div>
  38. </div><!-- top -->
  39. <div class="header">
  40. <div class="summary">
  41. <a href="#pub-methods">Public Member Functions</a> &#124;
  42. <a href="#friends">Friends</a> &#124;
  43. <a href="a00259.html">List of all members</a> </div>
  44. <div class="headertitle">
  45. <div class="title">tbb::mutex::scoped_lock Class Reference</div> </div>
  46. </div><!--header-->
  47. <div class="contents">
  48. <p>The scoped locking pattern.
  49. <a href="a00116.html#details">More...</a></p>
  50. <p><code>#include &lt;mutex.h&gt;</code></p>
  51. <div class="dynheader">
  52. Inheritance diagram for tbb::mutex::scoped_lock:</div>
  53. <div class="dyncontent">
  54. <div class="center">
  55. <img src="a00116.png" usemap="#tbb::mutex::scoped_lock_map" alt=""/>
  56. <map id="tbb::mutex::scoped_lock_map" name="tbb::mutex::scoped_lock_map">
  57. </map>
  58. </div></div>
  59. <table class="memberdecls">
  60. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  61. Public Member Functions</h2></td></tr>
  62. <tr class="memitem:a23122745ccd5fc2498fcbbd5ced09e06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23122745ccd5fc2498fcbbd5ced09e06"></a>
  63. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a23122745ccd5fc2498fcbbd5ced09e06">scoped_lock</a> ()</td></tr>
  64. <tr class="memdesc:a23122745ccd5fc2498fcbbd5ced09e06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct lock that has not acquired a mutex. <br/></td></tr>
  65. <tr class="separator:a23122745ccd5fc2498fcbbd5ced09e06"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:ab7c2074543443824790433d3d6c3fece"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7c2074543443824790433d3d6c3fece"></a>
  67. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#ab7c2074543443824790433d3d6c3fece">scoped_lock</a> (<a class="el" href="a00081.html">mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  68. <tr class="memdesc:ab7c2074543443824790433d3d6c3fece"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr>
  69. <tr class="separator:ab7c2074543443824790433d3d6c3fece"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:a08c399ee0bb9762039b29e570ec46fe9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08c399ee0bb9762039b29e570ec46fe9"></a>
  71. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a08c399ee0bb9762039b29e570ec46fe9">~scoped_lock</a> ()</td></tr>
  72. <tr class="memdesc:a08c399ee0bb9762039b29e570ec46fe9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release lock (if lock is held). <br/></td></tr>
  73. <tr class="separator:a08c399ee0bb9762039b29e570ec46fe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9fce3e2e9f592315dc9c1ada72ae5e3c"></a>
  75. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a9fce3e2e9f592315dc9c1ada72ae5e3c">acquire</a> (<a class="el" href="a00081.html">mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  76. <tr class="memdesc:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr>
  77. <tr class="separator:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a46f983371aa852d2427ce69f9a571f78"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a46f983371aa852d2427ce69f9a571f78"></a>
  79. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a46f983371aa852d2427ce69f9a571f78">try_acquire</a> (<a class="el" href="a00081.html">mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  80. <tr class="memdesc:a46f983371aa852d2427ce69f9a571f78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Try acquire lock on given mutex. <br/></td></tr>
  81. <tr class="separator:a46f983371aa852d2427ce69f9a571f78"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:a1a1590281ccca912229a689d920fd78a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a1590281ccca912229a689d920fd78a"></a>
  83. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a1a1590281ccca912229a689d920fd78a">release</a> ()</td></tr>
  84. <tr class="memdesc:a1a1590281ccca912229a689d920fd78a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release lock. <br/></td></tr>
  85. <tr class="separator:a1a1590281ccca912229a689d920fd78a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. </table><table class="memberdecls">
  87. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
  88. Friends</h2></td></tr>
  89. <tr class="memitem:a6f4535025b9df015e1a7d35f4e2bbee7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f4535025b9df015e1a7d35f4e2bbee7"></a>
  90. class&#160;</td><td class="memItemRight" valign="bottom"><b>mutex</b></td></tr>
  91. <tr class="separator:a6f4535025b9df015e1a7d35f4e2bbee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. </table>
  93. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  94. <div class="textblock"><p>The scoped locking pattern. </p>
  95. <p>It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. </p>
  96. </div><hr/>The documentation for this class was generated from the following file:<ul>
  97. <li>mutex.h</li>
  98. </ul>
  99. </div><!-- contents -->
  100. <hr>
  101. <p></p>
  102. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  103. <p></p>
  104. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  105. registered trademarks or trademarks of Intel Corporation or its
  106. subsidiaries in the United States and other countries.
  107. <p></p>
  108. * Other names and brands may be claimed as the property of others.