wut/group__coreinit__thread.html
2016-01-11 01:17:32 +00:00

1338 lines
71 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.10"/>
<title>WUT: Thread</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>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">WUT
&#160;<span id="projectnumber">0.1</span>
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Thread<div class="ingroups"><a class="el" href="group__coreinit.html">coreinit</a></div></div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_s_context.html">OSContext</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_s_mutex_queue.html">OSMutexQueue</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_s_fast_mutex_queue.html">OSFastMutexQueue</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_s_thread.html">OSThread</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga919f76d6fbdcfed27d8a820cf48cd274"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga919f76d6fbdcfed27d8a820cf48cd274">OS_CONTEXT_TAG</a>&#160;&#160;&#160;0x4F53436F6E747874ull</td></tr>
<tr class="separator:ga919f76d6fbdcfed27d8a820cf48cd274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga557f93deefa5ce76cc300ec1beb0c879"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga557f93deefa5ce76cc300ec1beb0c879">OS_THREAD_TAG</a>&#160;&#160;&#160;0x74487244u</td></tr>
<tr class="separator:ga557f93deefa5ce76cc300ec1beb0c879"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga924296baf430a531adb5135a5cd54207"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_context.html">OSContext</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga924296baf430a531adb5135a5cd54207">OSContext</a></td></tr>
<tr class="separator:ga924296baf430a531adb5135a5cd54207"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a46c02caff79a13ecf041e55a454696"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_fast_mutex.html">OSFastMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga1a46c02caff79a13ecf041e55a454696">OSFastMutex</a></td></tr>
<tr class="separator:ga1a46c02caff79a13ecf041e55a454696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ab521577a62122534149c14253952cb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_fast_mutex_queue.html">OSFastMutexQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga6ab521577a62122534149c14253952cb">OSFastMutexQueue</a></td></tr>
<tr class="separator:ga6ab521577a62122534149c14253952cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42b7c5a07043d7f6c8324f51ac1747c8"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_mutex.html">OSMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga42b7c5a07043d7f6c8324f51ac1747c8">OSMutex</a></td></tr>
<tr class="separator:ga42b7c5a07043d7f6c8324f51ac1747c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga585231e15c29fd8485e2ef645623fdec"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_mutex_queue.html">OSMutexQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga585231e15c29fd8485e2ef645623fdec">OSMutexQueue</a></td></tr>
<tr class="separator:ga585231e15c29fd8485e2ef645623fdec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21cc46877b04baece01ef544fa06a906"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_s_thread.html">OSThread</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a></td></tr>
<tr class="separator:ga21cc46877b04baece01ef544fa06a906"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c33fd51f40dec4bfff9d98992c7e2cc"><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga1c33fd51f40dec4bfff9d98992c7e2cc">OSThreadState</a></td></tr>
<tr class="memdesc:ga1c33fd51f40dec4bfff9d98992c7e2cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">A value from enum OS_THREAD_STATE. <a href="#ga1c33fd51f40dec4bfff9d98992c7e2cc">More...</a><br /></td></tr>
<tr class="separator:ga1c33fd51f40dec4bfff9d98992c7e2cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2b4866b3e51f4690fd197462d2cdebe7"><td class="memItemLeft" align="right" valign="top">typedef uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga2b4866b3e51f4690fd197462d2cdebe7">OSThreadRequest</a></td></tr>
<tr class="memdesc:ga2b4866b3e51f4690fd197462d2cdebe7"><td class="mdescLeft">&#160;</td><td class="mdescRight">A value from enum OS_THREAD_REQUEST. <a href="#ga2b4866b3e51f4690fd197462d2cdebe7">More...</a><br /></td></tr>
<tr class="separator:ga2b4866b3e51f4690fd197462d2cdebe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga47c38b62e66b6163f6b080a35830897a"><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga47c38b62e66b6163f6b080a35830897a">OSThreadAttributes</a></td></tr>
<tr class="memdesc:ga47c38b62e66b6163f6b080a35830897a"><td class="mdescLeft">&#160;</td><td class="mdescRight">A bitfield of enum OS_THREAD_ATTRIB. <a href="#ga47c38b62e66b6163f6b080a35830897a">More...</a><br /></td></tr>
<tr class="separator:ga47c38b62e66b6163f6b080a35830897a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5cdc96dcec643891f88be54830acae9"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gab5cdc96dcec643891f88be54830acae9">OSThreadEntryPointFn</a>) (int argc, const char **argv)</td></tr>
<tr class="separator:gab5cdc96dcec643891f88be54830acae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga729a75fba87a2740d7af69aa8978ea5a"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga729a75fba87a2740d7af69aa8978ea5a">OSThreadCleanupCallbackFn</a>) (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, void *stack)</td></tr>
<tr class="separator:ga729a75fba87a2740d7af69aa8978ea5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac8fa3d74d8d161709d327e38eb426422"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gac8fa3d74d8d161709d327e38eb426422">OSThreadDeallocatorFn</a>) (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, void *stack)</td></tr>
<tr class="separator:gac8fa3d74d8d161709d327e38eb426422"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga2051f6f880e722ee1c16d7a9b33fc285"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga2051f6f880e722ee1c16d7a9b33fc285">OS_THREAD_STATE</a> <tr class="separator:ga2051f6f880e722ee1c16d7a9b33fc285"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:gac1b924b5c296e435eae41f0bf395d02a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gac1b924b5c296e435eae41f0bf395d02a">OS_THREAD_REQUEST</a> <tr class="separator:gac1b924b5c296e435eae41f0bf395d02a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:ga93f63e1c4e8826006db8878c9a6d0519"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga93f63e1c4e8826006db8878c9a6d0519">OS_THREAD_ATTRIB</a> <tr class="separator:ga93f63e1c4e8826006db8878c9a6d0519"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4dc00e8b9758c58fbdbb73350637f805"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga4dc00e8b9758c58fbdbb73350637f805">OSCancelThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga4dc00e8b9758c58fbdbb73350637f805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b90395dabd5e3077b274f8dd65fe5bb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga0b90395dabd5e3077b274f8dd65fe5bb">OSCheckActiveThreads</a> ()</td></tr>
<tr class="separator:ga0b90395dabd5e3077b274f8dd65fe5bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2bfc1c71ab2551fa12c1dd26c8c9efce"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga2bfc1c71ab2551fa12c1dd26c8c9efce">OSCheckThreadStackUsage</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga2bfc1c71ab2551fa12c1dd26c8c9efce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf3ca5305804fa4552529c5912c96ce2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaf3ca5305804fa4552529c5912c96ce2b">OSClearThreadStackUsage</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:gaf3ca5305804fa4552529c5912c96ce2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6aa2bd70bb3560ca3811aa0215971cf8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga6aa2bd70bb3560ca3811aa0215971cf8">OSContinueThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga6aa2bd70bb3560ca3811aa0215971cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga558f8aecea78aa6a81817c1d1fcbe8b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga558f8aecea78aa6a81817c1d1fcbe8b1">OSCreateThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, <a class="el" href="group__coreinit__thread.html#gab5cdc96dcec643891f88be54830acae9">OSThreadEntryPointFn</a> entry, int32_t argc, char *argv, void *stack, uint32_t stackSize, int32_t priority, <a class="el" href="group__coreinit__thread.html#ga47c38b62e66b6163f6b080a35830897a">OSThreadAttributes</a> attributes)</td></tr>
<tr class="separator:ga558f8aecea78aa6a81817c1d1fcbe8b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c8cbb581c038073ea97105cbc389e73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga5c8cbb581c038073ea97105cbc389e73">OSDetachThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga5c8cbb581c038073ea97105cbc389e73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga481f2365b62f2ed1b7cda3d0bec91ff2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga481f2365b62f2ed1b7cda3d0bec91ff2">OSExitThread</a> (int32_t result)</td></tr>
<tr class="separator:ga481f2365b62f2ed1b7cda3d0bec91ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga541eec9e102156579ad86cc440d741b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga541eec9e102156579ad86cc440d741b1">OSGetActiveThreadLink</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, <a class="el" href="struct_o_s_thread_link.html">OSThreadLink</a> *link)</td></tr>
<tr class="separator:ga541eec9e102156579ad86cc440d741b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3665f0196d1fc7983ad7a311fa1bfc37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga3665f0196d1fc7983ad7a311fa1bfc37">OSGetCurrentThread</a> ()</td></tr>
<tr class="separator:ga3665f0196d1fc7983ad7a311fa1bfc37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad10a0ac959b7542472ae547a1e38b2b7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gad10a0ac959b7542472ae547a1e38b2b7">OSGetDefaultThread</a> (uint32_t coreID)</td></tr>
<tr class="separator:gad10a0ac959b7542472ae547a1e38b2b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42e2be4ac798739e6b6e947099547921"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga42e2be4ac798739e6b6e947099547921">OSGetStackPointer</a> ()</td></tr>
<tr class="separator:ga42e2be4ac798739e6b6e947099547921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62e2afe54836ced17ce04b005b9be728"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga62e2afe54836ced17ce04b005b9be728">OSGetThreadAffinity</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga62e2afe54836ced17ce04b005b9be728"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga308e195cdc22b0290ea5b84774bf481e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga308e195cdc22b0290ea5b84774bf481e">OSGetThreadName</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga308e195cdc22b0290ea5b84774bf481e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e1c9d9b8de8927fb46276114a2f43ec"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga9e1c9d9b8de8927fb46276114a2f43ec">OSGetThreadPriority</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga9e1c9d9b8de8927fb46276114a2f43ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga467707b2709b2636dae204e0d2c2f49a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga467707b2709b2636dae204e0d2c2f49a">OSGetThreadSpecific</a> (uint32_t id)</td></tr>
<tr class="separator:ga467707b2709b2636dae204e0d2c2f49a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0074df288baf29c18a7c823c258ba353"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga0074df288baf29c18a7c823c258ba353">OSIsThreadSuspended</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga0074df288baf29c18a7c823c258ba353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bec4859c6c3575439660463ab58fc14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga0bec4859c6c3575439660463ab58fc14">OSIsThreadTerminated</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga0bec4859c6c3575439660463ab58fc14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabadb986bf587ed067719230d0194e432"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gabadb986bf587ed067719230d0194e432">OSJoinThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, int *threadResult)</td></tr>
<tr class="separator:gabadb986bf587ed067719230d0194e432"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e47bab6ad06370cbb0990d979e1729b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga8e47bab6ad06370cbb0990d979e1729b">OSResumeThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga8e47bab6ad06370cbb0990d979e1729b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3241ca6d126d3b4dc4be94d9836f573"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaa3241ca6d126d3b4dc4be94d9836f573">OSRunThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, <a class="el" href="group__coreinit__thread.html#gab5cdc96dcec643891f88be54830acae9">OSThreadEntryPointFn</a> entry, int argc, const char **argv)</td></tr>
<tr class="separator:gaa3241ca6d126d3b4dc4be94d9836f573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64b826e25d3352b17abf9a1e4243837e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga64b826e25d3352b17abf9a1e4243837e">OSSetThreadAffinity</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, uint32_t affinity)</td></tr>
<tr class="separator:ga64b826e25d3352b17abf9a1e4243837e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ab3e3f830d155273978285c2ee0670f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga5ab3e3f830d155273978285c2ee0670f">OSSetThreadCancelState</a> (<a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> state)</td></tr>
<tr class="separator:ga5ab3e3f830d155273978285c2ee0670f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaddb66bd8a4fcdd50eec34e0eaabaa4ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__coreinit__thread.html#ga729a75fba87a2740d7af69aa8978ea5a">OSThreadCleanupCallbackFn</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaddb66bd8a4fcdd50eec34e0eaabaa4ea">OSSetThreadCleanupCallback</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, <a class="el" href="group__coreinit__thread.html#ga729a75fba87a2740d7af69aa8978ea5a">OSThreadCleanupCallbackFn</a> callback)</td></tr>
<tr class="separator:gaddb66bd8a4fcdd50eec34e0eaabaa4ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5f71458522cd623a26fda4bc7a08706"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__coreinit__thread.html#gac8fa3d74d8d161709d327e38eb426422">OSThreadDeallocatorFn</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gab5f71458522cd623a26fda4bc7a08706">OSSetThreadDeallocator</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, <a class="el" href="group__coreinit__thread.html#gac8fa3d74d8d161709d327e38eb426422">OSThreadDeallocatorFn</a> deallocator)</td></tr>
<tr class="separator:gab5f71458522cd623a26fda4bc7a08706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf73770f5c74390d22caa7e993e667984"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaf73770f5c74390d22caa7e993e667984">OSSetThreadName</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, const char *name)</td></tr>
<tr class="separator:gaf73770f5c74390d22caa7e993e667984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf949db9990798fe799eef6f10400febc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaf949db9990798fe799eef6f10400febc">OSSetThreadPriority</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, int32_t priority)</td></tr>
<tr class="separator:gaf949db9990798fe799eef6f10400febc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabcdf5e618af28ab7d0eb1dcc9dfc9d36"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gabcdf5e618af28ab7d0eb1dcc9dfc9d36">OSSetThreadRunQuantum</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, uint32_t quantum)</td></tr>
<tr class="separator:gabcdf5e618af28ab7d0eb1dcc9dfc9d36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23deff033f4c5580a763547200ba9145"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga23deff033f4c5580a763547200ba9145">OSSetThreadSpecific</a> (uint32_t id, uint32_t value)</td></tr>
<tr class="separator:ga23deff033f4c5580a763547200ba9145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3be0f7ef0eed586ef8bf5d57f3cd1dfa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga3be0f7ef0eed586ef8bf5d57f3cd1dfa">OSSetThreadStackUsage</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga3be0f7ef0eed586ef8bf5d57f3cd1dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40601ddddabf312483c9a3da0a924fa6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga40601ddddabf312483c9a3da0a924fa6">OSSleepThread</a> (<a class="el" href="struct_o_s_thread_queue.html">OSThreadQueue</a> *queue)</td></tr>
<tr class="separator:ga40601ddddabf312483c9a3da0a924fa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaec240f68873bb19c753cfdd346264c17"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaec240f68873bb19c753cfdd346264c17">OSSleepTicks</a> (<a class="el" href="group__coreinit__time.html#ga4d4f771188f6c29e758ed6b3b8347b4d">OSTime</a> ticks)</td></tr>
<tr class="separator:gaec240f68873bb19c753cfdd346264c17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97d4800cbe08b3e3cd68906a197bf587"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga97d4800cbe08b3e3cd68906a197bf587">OSSuspendThread</a> (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread)</td></tr>
<tr class="separator:ga97d4800cbe08b3e3cd68906a197bf587"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d5f9fe631c3b30a30ee84a2d32a617c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga3d5f9fe631c3b30a30ee84a2d32a617c">OSTestThreadCancel</a> ()</td></tr>
<tr class="separator:ga3d5f9fe631c3b30a30ee84a2d32a617c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga233d3d678de8dcccceb18424e24950b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#ga233d3d678de8dcccceb18424e24950b8">OSWakeupThread</a> (<a class="el" href="struct_o_s_thread_queue.html">OSThreadQueue</a> *queue)</td></tr>
<tr class="separator:ga233d3d678de8dcccceb18424e24950b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabc089f75f232061a8ba1c2f4d3a9169"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__thread.html#gaabc089f75f232061a8ba1c2f4d3a9169">OSYieldThread</a> ()</td></tr>
<tr class="separator:gaabc089f75f232061a8ba1c2f4d3a9169"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The thread scheduler in the Wii U uses co-operative scheduling, this is different to the usual pre-emptive scheduling that most operating systems use (such as Windows, Linux, etc). In co-operative scheduling threads must voluntarily yield execution to other threads. In pre-emptive threads are switched by the operating system after an amount of time.</p>
<p>With the Wii U's scheduling model the thread with the highest priority which is in a non-waiting state will always be running (where 0 is the highest priority and 31 is the lowest). Execution will only switch to other threads once this thread has been forced to wait, such as when waiting to acquire a mutex, or when the thread voluntarily yields execution to other threads which have the same priority using OSYieldThread. OSYieldThread will never yield to a thread with lower priority than the current thread. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga919f76d6fbdcfed27d8a820cf48cd274"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define OS_CONTEXT_TAG&#160;&#160;&#160;0x4F53436F6E747874ull</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00095">95</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga557f93deefa5ce76cc300ec1beb0c879"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define OS_THREAD_TAG&#160;&#160;&#160;0x74487244u</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00174">174</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga924296baf430a531adb5135a5cd54207"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_context.html">OSContext</a> <a class="el" href="struct_o_s_context.html">OSContext</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00030">30</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga1a46c02caff79a13ecf041e55a454696"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_fast_mutex.html">OSFastMutex</a> <a class="el" href="struct_o_s_fast_mutex.html">OSFastMutex</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00031">31</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga6ab521577a62122534149c14253952cb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_fast_mutex_queue.html">OSFastMutexQueue</a> <a class="el" href="struct_o_s_fast_mutex_queue.html">OSFastMutexQueue</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00032">32</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga42b7c5a07043d7f6c8324f51ac1747c8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_mutex.html">OSMutex</a> <a class="el" href="struct_o_s_mutex.html">OSMutex</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00033">33</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga585231e15c29fd8485e2ef645623fdec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_mutex_queue.html">OSMutexQueue</a> <a class="el" href="struct_o_s_mutex_queue.html">OSMutexQueue</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00034">34</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga21cc46877b04baece01ef544fa06a906"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_o_s_thread.html">OSThread</a> <a class="el" href="struct_o_s_thread.html">OSThread</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00035">35</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga1c33fd51f40dec4bfff9d98992c7e2cc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t <a class="el" href="group__coreinit__thread.html#ga1c33fd51f40dec4bfff9d98992c7e2cc">OSThreadState</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>A value from enum OS_THREAD_STATE. </p>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00038">38</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga2b4866b3e51f4690fd197462d2cdebe7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint32_t <a class="el" href="group__coreinit__thread.html#ga2b4866b3e51f4690fd197462d2cdebe7">OSThreadRequest</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>A value from enum OS_THREAD_REQUEST. </p>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00041">41</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga47c38b62e66b6163f6b080a35830897a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t <a class="el" href="group__coreinit__thread.html#ga47c38b62e66b6163f6b080a35830897a">OSThreadAttributes</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>A bitfield of enum OS_THREAD_ATTRIB. </p>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00044">44</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="gab5cdc96dcec643891f88be54830acae9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* OSThreadEntryPointFn) (int argc, const char **argv)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00046">46</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga729a75fba87a2740d7af69aa8978ea5a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* OSThreadCleanupCallbackFn) (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, void *stack)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00047">47</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="gac8fa3d74d8d161709d327e38eb426422"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* OSThreadDeallocatorFn) (<a class="el" href="struct_o_s_thread.html">OSThread</a> *thread, void *stack)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="thread_8h_source.html#l00048">48</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga2051f6f880e722ee1c16d7a9b33fc285"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__coreinit__thread.html#ga2051f6f880e722ee1c16d7a9b33fc285">OS_THREAD_STATE</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga2051f6f880e722ee1c16d7a9b33fc285a13a1674553ea65a706ae780c20ae84bc"></a>OS_THREAD_STATE_NONE&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2051f6f880e722ee1c16d7a9b33fc285aba95f54efb4f40634409efe14ac7aa1f"></a>OS_THREAD_STATE_READY&#160;</td><td class="fielddoc">
<p>Thread is ready to run. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2051f6f880e722ee1c16d7a9b33fc285ad2b8ca7ea948310fdce859f2a7fd265b"></a>OS_THREAD_STATE_RUNNING&#160;</td><td class="fielddoc">
<p>Thread is running. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2051f6f880e722ee1c16d7a9b33fc285a4318e1cf6017f194840a32dd1be1d57f"></a>OS_THREAD_STATE_WAITING&#160;</td><td class="fielddoc">
<p>Thread is waiting, i.e. on a mutex. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga2051f6f880e722ee1c16d7a9b33fc285a1a499958e89f028b8c3d29f869f97517"></a>OS_THREAD_STATE_MORIBUND&#160;</td><td class="fielddoc">
<p>Thread is about to terminate. </p>
</td></tr>
</table>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00050">50</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="gac1b924b5c296e435eae41f0bf395d02a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__coreinit__thread.html#gac1b924b5c296e435eae41f0bf395d02a">OS_THREAD_REQUEST</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggac1b924b5c296e435eae41f0bf395d02aa46b42c24c445d69479b6a163ada1c3c0"></a>OS_THREAD_REQUEST_NONE&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac1b924b5c296e435eae41f0bf395d02aa632959c993cef4fd2735051db6797329"></a>OS_THREAD_REQUEST_SUSPEND&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac1b924b5c296e435eae41f0bf395d02aab227c9a028b4fb3a9f71afc33995748a"></a>OS_THREAD_REQUEST_CANCEL&#160;</td><td class="fielddoc">
</td></tr>
</table>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00067">67</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga93f63e1c4e8826006db8878c9a6d0519"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__coreinit__thread.html#ga93f63e1c4e8826006db8878c9a6d0519">OS_THREAD_ATTRIB</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519a3ea0c3a38f1342783fd2ddfa6a84a13d"></a>OS_THREAD_ATTRIB_AFFINITY_CPU0&#160;</td><td class="fielddoc">
<p>Allow the thread to run on CPU0. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519adcea8a57b4636bc5a0c3e283ce83e0f7"></a>OS_THREAD_ATTRIB_AFFINITY_CPU1&#160;</td><td class="fielddoc">
<p>Allow the thread to run on CPU1. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519a1434f284dfb835aa2d0704cebf81345c"></a>OS_THREAD_ATTRIB_AFFINITY_CPU2&#160;</td><td class="fielddoc">
<p>Allow the thread to run on CPU2. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519abb854560be1fd9b10763999f08b3591b"></a>OS_THREAD_ATTRIB_AFFINITY_ANY&#160;</td><td class="fielddoc">
<p>Allow the thread to run any CPU. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519a643750f290d1a1327e4d6f83a385a923"></a>OS_THREAD_ATTRIB_DETACHED&#160;</td><td class="fielddoc">
<p>Start the thread detached. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga93f63e1c4e8826006db8878c9a6d0519a6b6ea70f704c863a0a37b03ffbffaa85"></a>OS_THREAD_ATTRIB_STACK_USAGE&#160;</td><td class="fielddoc">
<p>Enables tracking of stack usage. </p>
</td></tr>
</table>
<p>Definition at line <a class="el" href="thread_8h_source.html#l00074">74</a> of file <a class="el" href="thread_8h_source.html">thread.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga4dc00e8b9758c58fbdbb73350637f805"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSCancelThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Cancels a thread.</p>
<p>This sets the threads requestFlag to OS_THREAD_REQUEST_CANCEL, the thread will be terminated next time OSTestThreadCancel is called. </p>
</div>
</div>
<a class="anchor" id="ga0b90395dabd5e3077b274f8dd65fe5bb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t OSCheckActiveThreads </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the count of active threads. </p>
</div>
</div>
<a class="anchor" id="ga2bfc1c71ab2551fa12c1dd26c8c9efce"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t OSCheckThreadStackUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the maximum amount of stack the thread has used. </p>
</div>
</div>
<a class="anchor" id="gaf3ca5305804fa4552529c5912c96ce2b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSClearThreadStackUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disable tracking of thread stack usage </p>
</div>
</div>
<a class="anchor" id="ga6aa2bd70bb3560ca3811aa0215971cf8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSContinueThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears a thread's suspend counter and resumes it. </p>
</div>
</div>
<a class="anchor" id="ga558f8aecea78aa6a81817c1d1fcbe8b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSCreateThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__thread.html#gab5cdc96dcec643891f88be54830acae9">OSThreadEntryPointFn</a>&#160;</td>
<td class="paramname"><em>entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>argv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>stack</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>stackSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>priority</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__thread.html#ga47c38b62e66b6163f6b080a35830897a">OSThreadAttributes</a>&#160;</td>
<td class="paramname"><em>attributes</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new thread.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">thread</td><td>Thread to initialise. </td></tr>
<tr><td class="paramname">entry</td><td>Thread entry point. </td></tr>
<tr><td class="paramname">argc</td><td>argc argument passed to entry point. </td></tr>
<tr><td class="paramname">argv</td><td>argv argument passed to entry point. </td></tr>
<tr><td class="paramname">stack</td><td>Top of stack (highest address). </td></tr>
<tr><td class="paramname">stackSize</td><td>Size of stack. </td></tr>
<tr><td class="paramname">priority</td><td>Thread priority, 0 is highest priorty, 31 is lowest. </td></tr>
<tr><td class="paramname">attributes</td><td>Thread attributes, see OSThreadAttributes. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5c8cbb581c038073ea97105cbc389e73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSDetachThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Detach thread. </p>
</div>
</div>
<a class="anchor" id="ga481f2365b62f2ed1b7cda3d0bec91ff2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSExitThread </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>result</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Exit the current thread with a exit code.</p>
<p>This function is implicitly called when the thread entry point returns. </p>
</div>
</div>
<a class="anchor" id="ga541eec9e102156579ad86cc440d741b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSGetActiveThreadLink </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_o_s_thread_link.html">OSThreadLink</a> *&#160;</td>
<td class="paramname"><em>link</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the next and previous thread in the thread's active queue. </p>
</div>
</div>
<a class="anchor" id="ga3665f0196d1fc7983ad7a311fa1bfc37"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_o_s_thread.html">OSThread</a>* OSGetCurrentThread </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return pointer to <a class="el" href="struct_o_s_thread.html">OSThread</a> object for the current thread. </p>
</div>
</div>
<a class="anchor" id="gad10a0ac959b7542472ae547a1e38b2b7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_o_s_thread.html">OSThread</a>* OSGetDefaultThread </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>coreID</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the default thread for a specific core.</p>
<p>Each core has 1 default thread created before the game boots. The default thread for core 1 calls the RPX entry point, the default threads for core 0 and 2 are suspended and can be used with OSRunThread. </p>
</div>
</div>
<a class="anchor" id="ga42e2be4ac798739e6b6e947099547921"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t OSGetStackPointer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return current stack pointer, value of r1 register. </p>
</div>
</div>
<a class="anchor" id="ga62e2afe54836ced17ce04b005b9be728"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t OSGetThreadAffinity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a thread's affinity. </p>
</div>
</div>
<a class="anchor" id="ga308e195cdc22b0290ea5b84774bf481e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* OSGetThreadName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a thread's name. </p>
</div>
</div>
<a class="anchor" id="ga9e1c9d9b8de8927fb46276114a2f43ec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t OSGetThreadPriority </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a thread's base priority. </p>
</div>
</div>
<a class="anchor" id="ga467707b2709b2636dae204e0d2c2f49a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t OSGetThreadSpecific </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>id</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a thread's specific value set by OSSetThreadSpecific. </p>
</div>
</div>
<a class="anchor" id="ga0074df288baf29c18a7c823c258ba353"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSIsThreadSuspended </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns TRUE if a thread is suspended. </p>
</div>
</div>
<a class="anchor" id="ga0bec4859c6c3575439660463ab58fc14"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSIsThreadTerminated </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns TRUE if a thread is terminated. </p>
</div>
</div>
<a class="anchor" id="gabadb986bf587ed067719230d0194e432"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSJoinThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>threadResult</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait until thread is terminated.</p>
<p>If the target thread is detached, returns FALSE.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">thread</td><td>Thread to wait for </td></tr>
<tr><td class="paramname">threadResult</td><td>Pointer to store thread exit value in. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns TRUE if thread has terminated, FALSE if thread is detached. </dd></dl>
</div>
</div>
<a class="anchor" id="ga8e47bab6ad06370cbb0990d979e1729b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t OSResumeThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resumes a thread.</p>
<p>Decrements the thread's suspend counter, if the counter reaches 0 the thread is resumed.</p>
<dl class="section return"><dt>Returns</dt><dd>Returns the previous value of the suspend counter. </dd></dl>
</div>
</div>
<a class="anchor" id="gaa3241ca6d126d3b4dc4be94d9836f573"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSRunThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__thread.html#gab5cdc96dcec643891f88be54830acae9">OSThreadEntryPointFn</a>&#160;</td>
<td class="paramname"><em>entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Run a function on an already created thread.</p>
<p>Can only be used on idle threads. </p>
</div>
</div>
<a class="anchor" id="ga64b826e25d3352b17abf9a1e4243837e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSSetThreadAffinity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>affinity</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread's affinity. </p>
</div>
</div>
<a class="anchor" id="ga5ab3e3f830d155273978285c2ee0670f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSSetThreadCancelState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a>&#160;</td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread's cancellation state.</p>
<p>If the state is TRUE then the thread can be suspended or cancelled when OSTestThreadCancel is called. </p>
</div>
</div>
<a class="anchor" id="gaddb66bd8a4fcdd50eec34e0eaabaa4ea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__coreinit__thread.html#ga729a75fba87a2740d7af69aa8978ea5a">OSThreadCleanupCallbackFn</a> OSSetThreadCleanupCallback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__thread.html#ga729a75fba87a2740d7af69aa8978ea5a">OSThreadCleanupCallbackFn</a>&#160;</td>
<td class="paramname"><em>callback</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the callback to be called just before a thread is terminated. </p>
</div>
</div>
<a class="anchor" id="gab5f71458522cd623a26fda4bc7a08706"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__coreinit__thread.html#gac8fa3d74d8d161709d327e38eb426422">OSThreadDeallocatorFn</a> OSSetThreadDeallocator </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__thread.html#gac8fa3d74d8d161709d327e38eb426422">OSThreadDeallocatorFn</a>&#160;</td>
<td class="paramname"><em>deallocator</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the callback to be called just after a thread is terminated. </p>
</div>
</div>
<a class="anchor" id="gaf73770f5c74390d22caa7e993e667984"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSSetThreadName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread's name. </p>
</div>
</div>
<a class="anchor" id="gaf949db9990798fe799eef6f10400febc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSSetThreadPriority </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>priority</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread's priority. </p>
</div>
</div>
<a class="anchor" id="gabcdf5e618af28ab7d0eb1dcc9dfc9d36"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSSetThreadRunQuantum </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>quantum</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread's run quantum.</p>
<p>This is the maximum amount of time the thread can run for before being forced to yield. </p>
</div>
</div>
<a class="anchor" id="ga23deff033f4c5580a763547200ba9145"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSSetThreadSpecific </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread specific value.</p>
<p>Can be read with OSGetThreadSpecific. </p>
</div>
</div>
<a class="anchor" id="ga3be0f7ef0eed586ef8bf5d57f3cd1dfa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="wut__types_8h.html#a050c65e107f0c828f856a231f4b4e788">BOOL</a> OSSetThreadStackUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set thread stack usage tracking. </p>
</div>
</div>
<a class="anchor" id="ga40601ddddabf312483c9a3da0a924fa6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSSleepThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread_queue.html">OSThreadQueue</a> *&#160;</td>
<td class="paramname"><em>queue</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleep the current thread and add it to a thread queue.</p>
<p>Will sleep until the thread queue is woken with OSWakeupThread. </p>
</div>
</div>
<a class="anchor" id="gaec240f68873bb19c753cfdd346264c17"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSSleepTicks </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__coreinit__time.html#ga4d4f771188f6c29e758ed6b3b8347b4d">OSTime</a>&#160;</td>
<td class="paramname"><em>ticks</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleep the current thread for a period of time. </p>
</div>
</div>
<a class="anchor" id="ga97d4800cbe08b3e3cd68906a197bf587"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t OSSuspendThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread.html">OSThread</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Suspend a thread.</p>
<p>Increases a thread's suspend counter, if the counter is &gt;0 then the thread is suspended.</p>
<dl class="section return"><dt>Returns</dt><dd>Returns the thread's previous suspend counter value </dd></dl>
</div>
</div>
<a class="anchor" id="ga3d5f9fe631c3b30a30ee84a2d32a617c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSTestThreadCancel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check to see if the current thread should be cancelled or suspended.</p>
<p>This is implicitly called in:</p><ul>
<li>OSLockMutex</li>
<li>OSTryLockMutex</li>
<li>OSUnlockMutex</li>
<li>OSAcquireSpinLock</li>
<li>OSTryAcquireSpinLock</li>
<li>OSTryAcquireSpinLockWithTimeout</li>
<li>OSReleaseSpinLock</li>
<li>OSCancelThread </li>
</ul>
</div>
</div>
<a class="anchor" id="ga233d3d678de8dcccceb18424e24950b8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSWakeupThread </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_o_s_thread_queue.html">OSThreadQueue</a> *&#160;</td>
<td class="paramname"><em>queue</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wake up all threads in queue.</p>
<p>Clears the thread queue. </p>
</div>
</div>
<a class="anchor" id="gaabc089f75f232061a8ba1c2f4d3a9169"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSYieldThread </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Yield execution to waiting threads with same priority.</p>
<p>This will never switch to a thread with a lower priority than the current thread. </p>
</div>
</div>
</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.10
</small></address>
</body>
</html>