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.

136 lines
8.3 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::spin_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="a00127.html">spin_mutex</a></li><li class="navelem"><a class="el" href="a00113.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="a00282.html">List of all members</a> </div>
  44. <div class="headertitle">
  45. <div class="title">tbb::spin_mutex::scoped_lock Class Reference</div> </div>
  46. </div><!--header-->
  47. <div class="contents">
  48. <p>Represents acquisition of a mutex.
  49. <a href="a00113.html#details">More...</a></p>
  50. <p><code>#include &lt;spin_mutex.h&gt;</code></p>
  51. <div class="dynheader">
  52. Inheritance diagram for tbb::spin_mutex::scoped_lock:</div>
  53. <div class="dyncontent">
  54. <div class="center">
  55. <img src="a00113.png" usemap="#tbb::spin_mutex::scoped_lock_map" alt=""/>
  56. <map id="tbb::spin_mutex::scoped_lock_map" name="tbb::spin_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:a4287be975cf2448c95f068b065c45107"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4287be975cf2448c95f068b065c45107"></a>
  63. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a4287be975cf2448c95f068b065c45107">scoped_lock</a> ()</td></tr>
  64. <tr class="memdesc:a4287be975cf2448c95f068b065c45107"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct without acquiring a mutex. <br/></td></tr>
  65. <tr class="separator:a4287be975cf2448c95f068b065c45107"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:a73f7381a9a112b9f5a856b1face525fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73f7381a9a112b9f5a856b1face525fb"></a>
  67. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a73f7381a9a112b9f5a856b1face525fb">scoped_lock</a> (<a class="el" href="a00127.html">spin_mutex</a> &amp;m)</td></tr>
  68. <tr class="memdesc:a73f7381a9a112b9f5a856b1face525fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct and acquire lock on a mutex. <br/></td></tr>
  69. <tr class="separator:a73f7381a9a112b9f5a856b1face525fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:a7c702117f08ae82d034a98b3d5510ffc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c702117f08ae82d034a98b3d5510ffc"></a>
  71. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a7c702117f08ae82d034a98b3d5510ffc">acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &amp;m)</td></tr>
  72. <tr class="memdesc:a7c702117f08ae82d034a98b3d5510ffc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire lock. <br/></td></tr>
  73. <tr class="separator:a7c702117f08ae82d034a98b3d5510ffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:a76acbd67c74906f6ea33a1de6fd443ce"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a76acbd67c74906f6ea33a1de6fd443ce">try_acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &amp;m)</td></tr>
  75. <tr class="memdesc:a76acbd67c74906f6ea33a1de6fd443ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Try acquiring lock (non-blocking) <a href="#a76acbd67c74906f6ea33a1de6fd443ce">More...</a><br/></td></tr>
  76. <tr class="separator:a76acbd67c74906f6ea33a1de6fd443ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a7e801b0c28fd8395fec400b96acc5c34"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e801b0c28fd8395fec400b96acc5c34"></a>
  78. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a7e801b0c28fd8395fec400b96acc5c34">release</a> ()</td></tr>
  79. <tr class="memdesc:a7e801b0c28fd8395fec400b96acc5c34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release lock. <br/></td></tr>
  80. <tr class="separator:a7e801b0c28fd8395fec400b96acc5c34"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a9940d6e494466d9c53846ed347d79d83"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9940d6e494466d9c53846ed347d79d83"></a>
  82. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a9940d6e494466d9c53846ed347d79d83">~scoped_lock</a> ()</td></tr>
  83. <tr class="memdesc:a9940d6e494466d9c53846ed347d79d83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy lock. If holding a lock, releases the lock first. <br/></td></tr>
  84. <tr class="separator:a9940d6e494466d9c53846ed347d79d83"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. </table><table class="memberdecls">
  86. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
  87. Friends</h2></td></tr>
  88. <tr class="memitem:adf989c33fa5ee03e75925c2d0f86b89e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf989c33fa5ee03e75925c2d0f86b89e"></a>
  89. class&#160;</td><td class="memItemRight" valign="bottom"><b>spin_mutex</b></td></tr>
  90. <tr class="separator:adf989c33fa5ee03e75925c2d0f86b89e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. </table>
  92. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  93. <div class="textblock"><p>Represents acquisition of a mutex. </p>
  94. </div><h2 class="groupheader">Member Function Documentation</h2>
  95. <a class="anchor" id="a76acbd67c74906f6ea33a1de6fd443ce"></a>
  96. <div class="memitem">
  97. <div class="memproto">
  98. <table class="mlabels">
  99. <tr>
  100. <td class="mlabels-left">
  101. <table class="memname">
  102. <tr>
  103. <td class="memname">bool tbb::spin_mutex::scoped_lock::try_acquire </td>
  104. <td>(</td>
  105. <td class="paramtype"><a class="el" href="a00127.html">spin_mutex</a> &amp;&#160;</td>
  106. <td class="paramname"><em>m</em>)</td><td></td>
  107. <td></td>
  108. </tr>
  109. </table>
  110. </td>
  111. <td class="mlabels-right">
  112. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  113. </tr>
  114. </table>
  115. </div><div class="memdoc">
  116. <p>Try acquiring lock (non-blocking) </p>
  117. <p>Return true if lock acquired; false otherwise. </p>
  118. </div>
  119. </div>
  120. <hr/>The documentation for this class was generated from the following file:<ul>
  121. <li>spin_mutex.h</li>
  122. </ul>
  123. </div><!-- contents -->
  124. <hr>
  125. <p></p>
  126. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  127. <p></p>
  128. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  129. registered trademarks or trademarks of Intel Corporation or its
  130. subsidiaries in the United States and other countries.
  131. <p></p>
  132. * Other names and brands may be claimed as the property of others.