wut/group__coreinit__cond.html
2019-04-22 10:21:17 +10:00

315 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wut: Condition Variable</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" />
</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">1.0.0-beta8</span>
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<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>
</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="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Condition Variable<div class="ingroups"><a class="el" href="group__coreinit.html">coreinit</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Standard condition variable implementation.
<a href="#details">More...</a></p>
<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:structOSCondition"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a></td></tr>
<tr class="separator:structOSCondition"><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:ga9d3012d9d937bcd9fcfc12824af9011d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga9d3012d9d937bcd9fcfc12824af9011d">OS_CONDITION_TAG</a>&#160;&#160;&#160;0x634E6456u</td></tr>
<tr class="separator:ga9d3012d9d937bcd9fcfc12824af9011d"><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:ga00db74c3d6ce5f40511557e92df133eb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga00db74c3d6ce5f40511557e92df133eb">OSCondition</a></td></tr>
<tr class="separator:ga00db74c3d6ce5f40511557e92df133eb"><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="group__coreinit__mutex.html#structOSMutex">OSMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga42b7c5a07043d7f6c8324f51ac1747c8">OSMutex</a></td></tr>
<tr class="separator:ga42b7c5a07043d7f6c8324f51ac1747c8"><td class="memSeparator" colspan="2">&#160;</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:ga3380e1614dffb59637175a508d6f8395"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga3380e1614dffb59637175a508d6f8395">OSInitCond</a> (<a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *condition)</td></tr>
<tr class="memdesc:ga3380e1614dffb59637175a508d6f8395"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a condition variable structure. <a href="#ga3380e1614dffb59637175a508d6f8395">More...</a><br /></td></tr>
<tr class="separator:ga3380e1614dffb59637175a508d6f8395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fb5e451c43c561142042258ab65650d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga3fb5e451c43c561142042258ab65650d">OSInitCondEx</a> (<a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *condition, const char *name)</td></tr>
<tr class="memdesc:ga3fb5e451c43c561142042258ab65650d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a condition variable structure with a name. <a href="#ga3fb5e451c43c561142042258ab65650d">More...</a><br /></td></tr>
<tr class="separator:ga3fb5e451c43c561142042258ab65650d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab0defea1070e1f129578d98dc023f05d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#gab0defea1070e1f129578d98dc023f05d">OSWaitCond</a> (<a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *condition, <a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex)</td></tr>
<tr class="memdesc:gab0defea1070e1f129578d98dc023f05d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sleep the current thread until the condition variable has been signalled. <a href="#gab0defea1070e1f129578d98dc023f05d">More...</a><br /></td></tr>
<tr class="separator:gab0defea1070e1f129578d98dc023f05d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ad088d1be5fd1558263491a65b48984"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__cond.html#ga4ad088d1be5fd1558263491a65b48984">OSSignalCond</a> (<a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *condition)</td></tr>
<tr class="memdesc:ga4ad088d1be5fd1558263491a65b48984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Will wake up any threads waiting on the condition with OSWaitCond. <a href="#ga4ad088d1be5fd1558263491a65b48984">More...</a><br /></td></tr>
<tr class="separator:ga4ad088d1be5fd1558263491a65b48984"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Standard condition variable implementation. </p>
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/condition_variable">std::condition_variable</a>. </p>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structOSCondition" id="structOSCondition"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structOSCondition">&#9670;&nbsp;</a></span>OSCondition</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct OSCondition</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="condition_8h_source.html#l00024">24</a> of file <a class="el" href="condition_8h_source.html">condition.h</a>.</p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a id="a1c50fcd1195659821729f52af8f3bb7d"></a>uint32_t</td>
<td class="fieldname">
tag</td>
<td class="fielddoc">
Should always be set to the value OS_CONDITION_TAG. </td></tr>
<tr><td class="fieldtype">
<a id="a8f8f80d37794cde9472343e4487ba3eb"></a>const char *</td>
<td class="fieldname">
name</td>
<td class="fielddoc">
Name set by OSInitCondEx. </td></tr>
<tr><td class="fieldtype">
<a id="a4c72ffd2d6a41665aa8203649acbb46d"></a><a class="el" href="group__coreinit__threadq.html#structOSThreadQueue">OSThreadQueue</a></td>
<td class="fieldname">
queue</td>
<td class="fielddoc">
Queue of threads currently waiting on condition with OSWaitCond. </td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga9d3012d9d937bcd9fcfc12824af9011d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d3012d9d937bcd9fcfc12824af9011d">&#9670;&nbsp;</a></span>OS_CONDITION_TAG</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define OS_CONDITION_TAG&#160;&#160;&#160;0x634E6456u</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="condition_8h_source.html#l00022">22</a> of file <a class="el" href="condition_8h_source.html">condition.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga00db74c3d6ce5f40511557e92df133eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga00db74c3d6ce5f40511557e92df133eb">&#9670;&nbsp;</a></span>OSCondition</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> <a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="condition_8h_source.html#l00019">19</a> of file <a class="el" href="condition_8h_source.html">condition.h</a>.</p>
</div>
</div>
<a id="ga42b7c5a07043d7f6c8324f51ac1747c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga42b7c5a07043d7f6c8324f51ac1747c8">&#9670;&nbsp;</a></span>OSMutex</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> <a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="condition_8h_source.html#l00020">20</a> of file <a class="el" href="condition_8h_source.html">condition.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga3380e1614dffb59637175a508d6f8395"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3380e1614dffb59637175a508d6f8395">&#9670;&nbsp;</a></span>OSInitCond()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSInitCond </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *&#160;</td>
<td class="paramname"><em>condition</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialise a condition variable structure. </p>
</div>
</div>
<a id="ga3fb5e451c43c561142042258ab65650d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3fb5e451c43c561142042258ab65650d">&#9670;&nbsp;</a></span>OSInitCondEx()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSInitCondEx </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *&#160;</td>
<td class="paramname"><em>condition</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>Initialise a condition variable structure with a name. </p>
</div>
</div>
<a id="gab0defea1070e1f129578d98dc023f05d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab0defea1070e1f129578d98dc023f05d">&#9670;&nbsp;</a></span>OSWaitCond()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSWaitCond </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *&#160;</td>
<td class="paramname"><em>condition</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *&#160;</td>
<td class="paramname"><em>mutex</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleep the current thread until the condition variable has been signalled. </p>
<p>The mutex must be locked when entering this function. Will unlock the mutex and then sleep, reacquiring the mutex when woken.</p>
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/condition_variable/wait">std::condition_variable::wait</a>. </p>
</div>
</div>
<a id="ga4ad088d1be5fd1558263491a65b48984"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4ad088d1be5fd1558263491a65b48984">&#9670;&nbsp;</a></span>OSSignalCond()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void OSSignalCond </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__coreinit__cond.html#structOSCondition">OSCondition</a> *&#160;</td>
<td class="paramname"><em>condition</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Will wake up any threads waiting on the condition with OSWaitCond. </p>
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all">std::condition_variable::notify_all</a>. </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.15
</small></address>
</body>
</html>