1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>OSUnlockMutex</title>
10</head>
11
12<body>
13
14<h1>OSUnlockMutex</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/os.h&gt;
19
20void OSUnlockMutex(OSMutex* mutex);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<TABLE class="arguments" border="1" >
25  <tr>
26<TH><STRONG><EM><CODE>mutex</CODE></EM></STRONG></TH>
27<TD>Pointer to mutex.</TD>
28  </tr>
29</TABLE>
30
31<h2>Return Values</h2>
32<p>None.</p>
33
34<h2>Description</h2>
35<p>The calling thread unlocks the mutex. The thread calling this function must be the mutex owner.</p>
36
37<p>If the calling thread has locked this mutex N times, the mutex will actually be released only on the Nth call to the <code>OSUnLockMutex</code> function.</p>
38
39<p>If a thread is called because a higher priority thread requires this mutex, and the priority of that thread is temporarily increased, the priority will be recalculated. (There's a chance that the priority will not be restored to its original state because it depends on other mutexes being saved.)</p>
40
41<p>If the mutex has been freed, all threads blocked by this mutex will be put into an executable state and run in order of their priority.</p>
42
43<h2>See Also</h2>
44<P class="reference">
45<A href="../toc.html#Thread" target="contents">Thread Functions</A>,
46<A href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</A>,
47<a href="OSInitCond.html">OSInitCond</a>,
48<a href="OSInitMutex.html">OSInitMutex</a>,
49<a href="OSLockMutex.html">OSLockMutex</a>,
50<a href="OSSignalCond.html">OSSignalCond</a>,
51<a href="OSTryLockMutex.html">OSTryLockMutex</a>,
52<a href="OSWaitCond.html">OSWaitCond</a>
53</p>
54
55<h2>Revision History</h2>
56<P>
572006/03/01 Initial version.<br>
58</p>
59
60<hr><p>CONFIDENTIAL</p></body>
61</html>