blob: a83d2d6c8bef7eed377d07e1583b35e722bda89f [file] [log] [blame]
<!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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::ScopedTaskSuspend 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1ScopedTaskSuspend.html">ScopedTaskSuspend</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1ScopedTaskSuspend-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::ScopedTaskSuspend Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Manages the suspension of another task.
<a href="classcrashpad_1_1ScopedTaskSuspend.html#details">More...</a></p>
<p><code>#include &quot;util/mach/scoped_task_suspend.h&quot;</code></p>
<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:adaa91f43b769f4f861b7258fb7e2ba4f"><td class="memItemLeft" align="right" valign="top"><a id="adaa91f43b769f4f861b7258fb7e2ba4f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ScopedTaskSuspend</b> (zx_handle_t task)</td></tr>
<tr class="separator:adaa91f43b769f4f861b7258fb7e2ba4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54783301963991b7ff6f5975d33d9f21"><td class="memItemLeft" align="right" valign="top"><a id="a54783301963991b7ff6f5975d33d9f21"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ScopedTaskSuspend</b> (task_t task)</td></tr>
<tr class="separator:a54783301963991b7ff6f5975d33d9f21"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages the suspension of another task. </p>
<p>The underlying API only supports suspending threads (despite its name) not entire tasks. As a result, it's possible some threads may not be correctly suspended/resumed as their creation might race enumeration.</p>
<p>Additionally, suspending a thread is asynchronous and may take an arbitrary amount of time.</p>
<p>Because of these limitations, this class is limited to being a best-effort, and correct suspension/resumption cannot be relied upon.</p>
<p>Callers should not attempt to suspend the current task as obtained via <code>zx_process_self()</code>.</p>
<p>While an object of this class exists, the other task will be suspended. Once the object is destroyed, the other task will become eligible for resumption. Note that suspensions are counted, and the task will not actually resume unless its suspend count drops to 0.</p>
<p>Callers should not attempt to suspend the current task (<code>mach_task_self()</code>). </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>util/fuchsia/scoped_task_suspend.h</li>
<li>util/fuchsia/scoped_task_suspend.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>