175 lines
12 KiB
HTML
175 lines
12 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.4"/>
|
|
<title>tbb::mutex Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.4 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="a00228.html">tbb</a></li><li class="navelem"><a class="el" href="a00077.html">mutex</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-attribs">Static Public Attributes</a> |
|
|
<a href="#friends">Friends</a> |
|
|
<a href="a00269.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">tbb::mutex Class Reference<div class="ingroups"><a class="el" href="a00249.html">Synchronization</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Wrapper around the platform's native lock.
|
|
<a href="a00077.html#details">More...</a></p>
|
|
|
|
<p><code>#include <mutex.h></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for tbb::mutex:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="a00077.png" usemap="#tbb::mutex_map" alt=""/>
|
|
<map id="tbb::mutex_map" name="tbb::mutex_map">
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html">scoped_lock</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern. <a href="a00123.html#details">More...</a><br/></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:ad35737cbe356d6814f59abba680ab067"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>state_t</b> { <b>INITIALIZED</b> =0x1234,
|
|
<b>DESTROYED</b> =0x789A,
|
|
<b>HELD</b> =0x56CD
|
|
}</td></tr>
|
|
<tr class="separator:ad35737cbe356d6814f59abba680ab067"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abbe0cd12246121753ace00a5a12a90b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbe0cd12246121753ace00a5a12a90b0"></a>
|
|
typedef LPCRITICAL_SECTION </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#abbe0cd12246121753ace00a5a12a90b0">native_handle_type</a></td></tr>
|
|
<tr class="memdesc:abbe0cd12246121753ace00a5a12a90b0"><td class="mdescLeft"> </td><td class="mdescRight">Return native_handle. <br/></td></tr>
|
|
<tr class="separator:abbe0cd12246121753ace00a5a12a90b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0d992511dfc6f47295b10eb7fc0813d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d992511dfc6f47295b10eb7fc0813d4"></a>
|
|
typedef pthread_mutex_t * </td><td class="memItemRight" valign="bottom"><b>native_handle_type</b></td></tr>
|
|
<tr class="separator:a0d992511dfc6f47295b10eb7fc0813d4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:ad1b280c954ffc8b8b3e63e4ee4144035"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1b280c954ffc8b8b3e63e4ee4144035"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#ad1b280c954ffc8b8b3e63e4ee4144035">mutex</a> ()</td></tr>
|
|
<tr class="memdesc:ad1b280c954ffc8b8b3e63e4ee4144035"><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br/></td></tr>
|
|
<tr class="separator:ad1b280c954ffc8b8b3e63e4ee4144035"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a95ff02ee699b34696001db4003c11a3a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95ff02ee699b34696001db4003c11a3a"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#a95ff02ee699b34696001db4003c11a3a">lock</a> ()</td></tr>
|
|
<tr class="memdesc:a95ff02ee699b34696001db4003c11a3a"><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br/></td></tr>
|
|
<tr class="separator:a95ff02ee699b34696001db4003c11a3a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a480283933106941125717499f9c5ad42"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#a480283933106941125717499f9c5ad42">try_lock</a> ()</td></tr>
|
|
<tr class="memdesc:a480283933106941125717499f9c5ad42"><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking) <a href="#a480283933106941125717499f9c5ad42">More...</a><br/></td></tr>
|
|
<tr class="separator:a480283933106941125717499f9c5ad42"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a721eeae7ba16f8b92535f4534b583874"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a721eeae7ba16f8b92535f4534b583874"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#a721eeae7ba16f8b92535f4534b583874">unlock</a> ()</td></tr>
|
|
<tr class="memdesc:a721eeae7ba16f8b92535f4534b583874"><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br/></td></tr>
|
|
<tr class="separator:a721eeae7ba16f8b92535f4534b583874"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af69874d93822c905bdea0ab9e5ca5b89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af69874d93822c905bdea0ab9e5ca5b89"></a>
|
|
<a class="el" href="a00077.html#abbe0cd12246121753ace00a5a12a90b0">native_handle_type</a> </td><td class="memItemRight" valign="bottom"><b>native_handle</b> ()</td></tr>
|
|
<tr class="separator:af69874d93822c905bdea0ab9e5ca5b89"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0857c4596d7d5de09fe402ccd41d3e42"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0857c4596d7d5de09fe402ccd41d3e42"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00077.html#a0857c4596d7d5de09fe402ccd41d3e42">set_state</a> (state_t to)</td></tr>
|
|
<tr class="memdesc:a0857c4596d7d5de09fe402ccd41d3e42"><td class="mdescLeft"> </td><td class="mdescRight">Set the internal state. <br/></td></tr>
|
|
<tr class="separator:a0857c4596d7d5de09fe402ccd41d3e42"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
|
|
Static Public Attributes</h2></td></tr>
|
|
<tr class="memitem:a2677d672446faa842de9de38b3aff80a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2677d672446faa842de9de38b3aff80a"></a>
|
|
static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
|
|
<tr class="separator:a2677d672446faa842de9de38b3aff80a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adf7e9e11c47cc869d219298232d6c0a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf7e9e11c47cc869d219298232d6c0a1"></a>
|
|
static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
|
|
<tr class="separator:adf7e9e11c47cc869d219298232d6c0a1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab729ebd784af412184653c4fa90468d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab729ebd784af412184653c4fa90468d0"></a>
|
|
static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
|
|
<tr class="separator:ab729ebd784af412184653c4fa90468d0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
|
|
Friends</h2></td></tr>
|
|
<tr class="memitem:afcf922650b2fd9d76b7b939d8511bbd8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afcf922650b2fd9d76b7b939d8511bbd8"></a>
|
|
class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
|
|
<tr class="separator:afcf922650b2fd9d76b7b939d8511bbd8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Wrapper around the platform's native lock. </p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a480283933106941125717499f9c5ad42"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool tbb::mutex::try_lock </td>
|
|
<td>(</td>
|
|
<td class="paramname">)</td><td></td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Try acquiring lock (non-blocking) </p>
|
|
<p>Return true if lock acquired; false otherwise. </p>
|
|
|
|
<p>References <a class="el" href="a00014.html#a3525dbbac0d4eaedfe18bc57b7760857">tbb::aligned_space< T, N >::begin()</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="a00123.html#a46f983371aa852d2427ce69f9a571f78">tbb::mutex::scoped_lock::try_acquire()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>mutex.h</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<hr>
|
|
<p></p>
|
|
Copyright © 2005-2016 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.
|