mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-08 11:20:42 +01:00
403 lines
21 KiB
HTML
403 lines
21 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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>wut: Mutex</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
|
|
 <span id="projectnumber">1.0.0-beta9</span>
|
|
</div>
|
|
<div id="projectbrief">Wii U Toolchain</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&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&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> |
|
|
<a href="#define-members">Macros</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Mutex<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:structOSMutexLink"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#structOSMutexLink">OSMutexLink</a></td></tr>
|
|
<tr class="separator:structOSMutexLink"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:structOSMutex"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a></td></tr>
|
|
<tr class="separator:structOSMutex"><td class="memSeparator" colspan="2"> </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:ga30202e2a89cd5859a39b31a3f636cdca"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga30202e2a89cd5859a39b31a3f636cdca">OS_MUTEX_TAG</a>   0x6D557458u</td></tr>
|
|
<tr class="separator:ga30202e2a89cd5859a39b31a3f636cdca"><td class="memSeparator" colspan="2"> </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:ga21cc46877b04baece01ef544fa06a906"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__coreinit__mutex.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a></td></tr>
|
|
<tr class="separator:ga21cc46877b04baece01ef544fa06a906"><td class="memSeparator" colspan="2"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga42b7c5a07043d7f6c8324f51ac1747c8">OSMutex</a></td></tr>
|
|
<tr class="separator:ga42b7c5a07043d7f6c8324f51ac1747c8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga02c300c2030e332ddab54fba6272d821"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__coreinit__mutex.html#structOSMutexLink">OSMutexLink</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga02c300c2030e332ddab54fba6272d821">OSMutexLink</a></td></tr>
|
|
<tr class="separator:ga02c300c2030e332ddab54fba6272d821"><td class="memSeparator" colspan="2"> </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:ga03d1b0af602295a14f6df01d5a0aa12e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga03d1b0af602295a14f6df01d5a0aa12e">OSInitMutex</a> (<a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex)</td></tr>
|
|
<tr class="memdesc:ga03d1b0af602295a14f6df01d5a0aa12e"><td class="mdescLeft"> </td><td class="mdescRight">Initialise a mutex structure. <a href="group__coreinit__mutex.html#ga03d1b0af602295a14f6df01d5a0aa12e">More...</a><br /></td></tr>
|
|
<tr class="separator:ga03d1b0af602295a14f6df01d5a0aa12e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7bfdd3b29adc53f3fc206934d80c13e7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga7bfdd3b29adc53f3fc206934d80c13e7">OSInitMutexEx</a> (<a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex, const char *name)</td></tr>
|
|
<tr class="memdesc:ga7bfdd3b29adc53f3fc206934d80c13e7"><td class="mdescLeft"> </td><td class="mdescRight">Initialise a mutex structure with a name. <a href="group__coreinit__mutex.html#ga7bfdd3b29adc53f3fc206934d80c13e7">More...</a><br /></td></tr>
|
|
<tr class="separator:ga7bfdd3b29adc53f3fc206934d80c13e7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac540b8ab45b64548e31395f193f0fc49"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#gac540b8ab45b64548e31395f193f0fc49">OSLockMutex</a> (<a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex)</td></tr>
|
|
<tr class="memdesc:gac540b8ab45b64548e31395f193f0fc49"><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="group__coreinit__mutex.html#gac540b8ab45b64548e31395f193f0fc49">More...</a><br /></td></tr>
|
|
<tr class="separator:gac540b8ab45b64548e31395f193f0fc49"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga5892ff24353a07eaec68242ef44998d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#ga5892ff24353a07eaec68242ef44998d2">OSTryLockMutex</a> (<a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex)</td></tr>
|
|
<tr class="memdesc:ga5892ff24353a07eaec68242ef44998d2"><td class="mdescLeft"> </td><td class="mdescRight">Try to lock a mutex. <a href="group__coreinit__mutex.html#ga5892ff24353a07eaec68242ef44998d2">More...</a><br /></td></tr>
|
|
<tr class="separator:ga5892ff24353a07eaec68242ef44998d2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gabdcea1245d3bf588114b33e213892d6f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__coreinit__mutex.html#gabdcea1245d3bf588114b33e213892d6f">OSUnlockMutex</a> (<a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *mutex)</td></tr>
|
|
<tr class="memdesc:gabdcea1245d3bf588114b33e213892d6f"><td class="mdescLeft"> </td><td class="mdescRight">Unlocks the mutex. <a href="group__coreinit__mutex.html#gabdcea1245d3bf588114b33e213892d6f">More...</a><br /></td></tr>
|
|
<tr class="separator:gabdcea1245d3bf588114b33e213892d6f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>Standard mutex object, supports recursive locking.</p>
|
|
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/recursive_mutex">std::recursive_mutex</a>. </p>
|
|
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
|
|
<a name="structOSMutexLink" id="structOSMutexLink"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#structOSMutexLink">◆ </a></span>OSMutexLink</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">struct OSMutexLink</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<div class="textblock">
|
|
<p class="definition">Definition at line <a class="el" href="mutex_8h_source.html#l00024">24</a> of file <a class="el" href="mutex_8h_source.html">mutex.h</a>.</p>
|
|
</div><table class="fieldtable">
|
|
<tr><th colspan="3">Data Fields</th></tr>
|
|
<tr><td class="fieldtype">
|
|
<a id="afa7ec7c377e9b9e79044cfcb94282886"></a><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *</td>
|
|
<td class="fieldname">
|
|
next</td>
|
|
<td class="fielddoc">
|
|
</td></tr>
|
|
<tr><td class="fieldtype">
|
|
<a id="afea7449be1ffc76a4e1a98d60569ceb0"></a><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> *</td>
|
|
<td class="fieldname">
|
|
prev</td>
|
|
<td class="fielddoc">
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<a name="structOSMutex" id="structOSMutex"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#structOSMutex">◆ </a></span>OSMutex</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">struct OSMutex</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<div class="textblock">
|
|
<p class="definition">Definition at line <a class="el" href="mutex_8h_source.html#l00035">35</a> of file <a class="el" href="mutex_8h_source.html">mutex.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_MUTEX_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 OSInitMutexEx. </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 waiting for this mutex to unlock. </td></tr>
|
|
<tr><td class="fieldtype">
|
|
<a id="acf3a8aadbeb5c6f5e8e6883865d082fa"></a><a class="el" href="group__coreinit__mutex.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a> *</td>
|
|
<td class="fieldname">
|
|
owner</td>
|
|
<td class="fielddoc">
|
|
Current owner of mutex. </td></tr>
|
|
<tr><td class="fieldtype">
|
|
<a id="a4858b400f708a13bd514376ab941b27d"></a>int32_t</td>
|
|
<td class="fieldname">
|
|
count</td>
|
|
<td class="fielddoc">
|
|
Current recursion lock count of mutex. </td></tr>
|
|
<tr><td class="fieldtype">
|
|
<a id="a7bd72373386c4d04a9fa7cf905f34572"></a><a class="el" href="group__coreinit__mutex.html#structOSMutexLink">OSMutexLink</a></td>
|
|
<td class="fieldname">
|
|
link</td>
|
|
<td class="fielddoc">
|
|
Link used inside OSThread's mutex queue. </td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Macro Definition Documentation</h2>
|
|
<a id="ga30202e2a89cd5859a39b31a3f636cdca"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga30202e2a89cd5859a39b31a3f636cdca">◆ </a></span>OS_MUTEX_TAG</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define OS_MUTEX_TAG   0x6D557458u</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="mutex_8h_source.html#l00033">33</a> of file <a class="el" href="mutex_8h_source.html">mutex.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Typedef Documentation</h2>
|
|
<a id="ga21cc46877b04baece01ef544fa06a906"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga21cc46877b04baece01ef544fa06a906">◆ </a></span>OSThread</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="group__coreinit__mutex.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a> <a class="el" href="group__coreinit__mutex.html#ga21cc46877b04baece01ef544fa06a906">OSThread</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="mutex_8h_source.html#l00019">19</a> of file <a class="el" href="mutex_8h_source.html">mutex.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga42b7c5a07043d7f6c8324f51ac1747c8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga42b7c5a07043d7f6c8324f51ac1747c8">◆ </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="mutex_8h_source.html#l00021">21</a> of file <a class="el" href="mutex_8h_source.html">mutex.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga02c300c2030e332ddab54fba6272d821"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga02c300c2030e332ddab54fba6272d821">◆ </a></span>OSMutexLink</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="group__coreinit__mutex.html#structOSMutexLink">OSMutexLink</a> <a class="el" href="group__coreinit__mutex.html#structOSMutexLink">OSMutexLink</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="mutex_8h_source.html#l00022">22</a> of file <a class="el" href="mutex_8h_source.html">mutex.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="ga03d1b0af602295a14f6df01d5a0aa12e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga03d1b0af602295a14f6df01d5a0aa12e">◆ </a></span>OSInitMutex()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void OSInitMutex </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> * </td>
|
|
<td class="paramname"><em>mutex</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Initialise a mutex structure. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga7bfdd3b29adc53f3fc206934d80c13e7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga7bfdd3b29adc53f3fc206934d80c13e7">◆ </a></span>OSInitMutexEx()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void OSInitMutexEx </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> * </td>
|
|
<td class="paramname"><em>mutex</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>name</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Initialise a mutex structure with a name. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gac540b8ab45b64548e31395f193f0fc49"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac540b8ab45b64548e31395f193f0fc49">◆ </a></span>OSLockMutex()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void OSLockMutex </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> * </td>
|
|
<td class="paramname"><em>mutex</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Lock the mutex. </p>
|
|
<p>If no one owns the mutex, set current thread as owner.</p>
|
|
<p>If the lock is owned by the current thread, increase the recursion count.</p>
|
|
<p>If the lock is owned by another thread, the current thread will sleep until the owner has unlocked this mutex.</p>
|
|
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/recursive_mutex/lock">std::recursive_mutex::lock</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga5892ff24353a07eaec68242ef44998d2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5892ff24353a07eaec68242ef44998d2">◆ </a></span>OSTryLockMutex()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a> OSTryLockMutex </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> * </td>
|
|
<td class="paramname"><em>mutex</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Try to lock a mutex. </p>
|
|
<p>If no one owns the mutex, set current thread as owner.</p>
|
|
<p>If the lock is owned by the current thread, increase the recursion count.</p>
|
|
<p>If the lock is owned by another thread, do not block, return FALSE.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>TRUE if the mutex is locked, FALSE if the mutex is owned by another thread.</dd></dl>
|
|
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/recursive_mutex/try_lock">std::recursive_mutex::try_lock</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gabdcea1245d3bf588114b33e213892d6f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gabdcea1245d3bf588114b33e213892d6f">◆ </a></span>OSUnlockMutex()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void OSUnlockMutex </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__coreinit__mutex.html#structOSMutex">OSMutex</a> * </td>
|
|
<td class="paramname"><em>mutex</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Unlocks the mutex. </p>
|
|
<p>Will decrease the recursion count, will only unlock the mutex when the recursion count reaches 0.</p>
|
|
<p>If any other threads are waiting to lock the mutex they will be woken.</p>
|
|
<p>Similar to <a href="http://en.cppreference.com/w/cpp/thread/recursive_mutex/unlock">std::recursive_mutex::unlock</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|