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.8 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::recursive_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="a00107.html">recursive_mutex</a></li><li class="navelem"><a class="el" href="a00120.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="a00276.html">List of all members</a> </div>
  44. <div class="headertitle">
  45. <div class="title">tbb::recursive_mutex::scoped_lock Class Reference</div> </div>
  46. </div><!--header-->
  47. <div class="contents">
  48. <p>The scoped locking pattern.
  49. <a href="a00120.html#details">More...</a></p>
  50. <p><code>#include &lt;recursive_mutex.h&gt;</code></p>
  51. <div class="dynheader">
  52. Inheritance diagram for tbb::recursive_mutex::scoped_lock:</div>
  53. <div class="dyncontent">
  54. <div class="center">
  55. <img src="a00120.png" usemap="#tbb::recursive_mutex::scoped_lock_map" alt=""/>
  56. <map id="tbb::recursive_mutex::scoped_lock_map" name="tbb::recursive_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:a0a9962a3932cfbd0d12cb197494f951b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a9962a3932cfbd0d12cb197494f951b"></a>
  63. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a0a9962a3932cfbd0d12cb197494f951b">scoped_lock</a> ()</td></tr>
  64. <tr class="memdesc:a0a9962a3932cfbd0d12cb197494f951b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00107.html">recursive_mutex</a>. <br/></td></tr>
  65. <tr class="separator:a0a9962a3932cfbd0d12cb197494f951b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:ab42cb541abb9647cac23b1db9a4db93d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab42cb541abb9647cac23b1db9a4db93d"></a>
  67. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ab42cb541abb9647cac23b1db9a4db93d">scoped_lock</a> (<a class="el" href="a00107.html">recursive_mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  68. <tr class="memdesc:ab42cb541abb9647cac23b1db9a4db93d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr>
  69. <tr class="separator:ab42cb541abb9647cac23b1db9a4db93d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:a90a966e19120aac99b36a3d6d04af1a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90a966e19120aac99b36a3d6d04af1a2"></a>
  71. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a90a966e19120aac99b36a3d6d04af1a2">~scoped_lock</a> ()</td></tr>
  72. <tr class="memdesc:a90a966e19120aac99b36a3d6d04af1a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release lock (if lock is held). <br/></td></tr>
  73. <tr class="separator:a90a966e19120aac99b36a3d6d04af1a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:ac5450ce6a5813f395afaa434384c6539"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5450ce6a5813f395afaa434384c6539"></a>
  75. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ac5450ce6a5813f395afaa434384c6539">acquire</a> (<a class="el" href="a00107.html">recursive_mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  76. <tr class="memdesc:ac5450ce6a5813f395afaa434384c6539"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr>
  77. <tr class="separator:ac5450ce6a5813f395afaa434384c6539"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a160bba506f4033980ddb69ab7a02c4fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a160bba506f4033980ddb69ab7a02c4fb"></a>
  79. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a160bba506f4033980ddb69ab7a02c4fb">try_acquire</a> (<a class="el" href="a00107.html">recursive_mutex</a> &amp;<a class="el" href="a00081.html">mutex</a>)</td></tr>
  80. <tr class="memdesc:a160bba506f4033980ddb69ab7a02c4fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00107.html">recursive_mutex</a>. <br/></td></tr>
  81. <tr class="separator:a160bba506f4033980ddb69ab7a02c4fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:a2fe3246ffc26bdb5a58f33ca513b6c0f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fe3246ffc26bdb5a58f33ca513b6c0f"></a>
  83. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a2fe3246ffc26bdb5a58f33ca513b6c0f">release</a> ()</td></tr>
  84. <tr class="memdesc:a2fe3246ffc26bdb5a58f33ca513b6c0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release lock. <br/></td></tr>
  85. <tr class="separator:a2fe3246ffc26bdb5a58f33ca513b6c0f"><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:a1bdb637fe5c9412323bf92846b40682e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bdb637fe5c9412323bf92846b40682e"></a>
  90. class&#160;</td><td class="memItemRight" valign="bottom"><b>recursive_mutex</b></td></tr>
  91. <tr class="separator:a1bdb637fe5c9412323bf92846b40682e"><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>recursive_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.