gnuk/ChibiOS_2.0.2/docs/html/chsem_8h.html

90 lines
11 KiB
HTML
Raw Normal View History

2010-08-10 03:11:02 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChibiOS/RT: chsem.h File Reference</title>
<link href="custom.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<table style="text-align: center; width: 100%;" border="0"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 80px;"><img alt="ChibiOS/RT Logo" src="logo_small.png"></td>
<td><big><big>ChibiOS/RT</big></big><br><br>Architecture - Reference Manual - Guides</td>
<td style="width: 80px;"></td>
</tr>
</tbody>
</table>
<hr size="1">
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>chsem.h File Reference</h1>
<p>Semaphores macros and structures.
<a href="#_details">More...</a></p>
<p><a href="chsem_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_semaphore.html">Semaphore</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="struct_semaphore.html" title="Semaphore structure.">Semaphore</a> structure. <a href="struct_semaphore.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga1100c867cc8bd8328f7a7db5e7c74f6d">_SEMAPHORE_DATA</a>(name, n)&nbsp;&nbsp;&nbsp;{_THREADSQUEUE_DATA(name.s_queue), n}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Data part of a static semaphore initializer. <a href="group__semaphores.html#ga1100c867cc8bd8328f7a7db5e7c74f6d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gac09ac6a24cd3dbe91ac13d72bebf67c1">SEMAPHORE_DECL</a>(name, n)&nbsp;&nbsp;&nbsp;<a class="el" href="struct_semaphore.html">Semaphore</a> name = _SEMAPHORE_DATA(name, n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Static semaphore initializer. <a href="group__semaphores.html#gac09ac6a24cd3dbe91ac13d72bebf67c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga748b56bc2be187e316496d7b6e748f89">chSemFastWaitI</a>(sp)&nbsp;&nbsp;&nbsp;((sp)-&gt;s_cnt--)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decreases the semaphore counter. <a href="group__semaphores.html#ga748b56bc2be187e316496d7b6e748f89"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gacb89a28bd1fff2704207423f350215ba">chSemFastSignalI</a>(sp)&nbsp;&nbsp;&nbsp;((sp)-&gt;s_cnt++)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increases the semaphore counter. <a href="group__semaphores.html#gacb89a28bd1fff2704207423f350215ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gadab3ccf8a34988ef6d410354b2648327">chSemGetCounterI</a>(sp)&nbsp;&nbsp;&nbsp;((sp)-&gt;s_cnt)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the semaphore counter current value. <a href="group__semaphores.html#gadab3ccf8a34988ef6d410354b2648327"></a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_semaphore.html">Semaphore</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gac28c458b44903a8093398ef50333c513">Semaphore</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="struct_semaphore.html" title="Semaphore structure.">Semaphore</a> structure. <a href="group__semaphores.html#gac28c458b44903a8093398ef50333c513"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58">chSemInit</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp, <a class="el" href="group___s_t_m8___c_o_r_e.html#gabd9c89fef81ed2bca6eee5bbad28e251">cnt_t</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a semaphore with the specified counter value. <a href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga58e266e609cfd3dbc67f299b3ae9debb">chSemReset</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp, <a class="el" href="group___s_t_m8___c_o_r_e.html#gabd9c89fef81ed2bca6eee5bbad28e251">cnt_t</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a reset operation on the semaphore. <a href="group__semaphores.html#ga58e266e609cfd3dbc67f299b3ae9debb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gae7972b6b22b80ac09bac5a186277ab81">chSemResetI</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp, <a class="el" href="group___s_t_m8___c_o_r_e.html#gabd9c89fef81ed2bca6eee5bbad28e251">cnt_t</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a reset operation on the semaphore. <a href="group__semaphores.html#gae7972b6b22b80ac09bac5a186277ab81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___s_t_m8___c_o_r_e.html#ga1e402860c42e2ceda36d0307f3aa6209">msg_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gabc8f7e509870e9b0527a6a68fad71425">chSemWait</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a wait operation on a semaphore. <a href="group__semaphores.html#gabc8f7e509870e9b0527a6a68fad71425"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___s_t_m8___c_o_r_e.html#ga1e402860c42e2ceda36d0307f3aa6209">msg_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gaa2c0367078533e291d2e889e251d8b67">chSemWaitS</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a wait operation on a semaphore. <a href="group__semaphores.html#gaa2c0367078533e291d2e889e251d8b67"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___s_t_m8___c_o_r_e.html#ga1e402860c42e2ceda36d0307f3aa6209">msg_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga0bc227311e5be3e3b6e3aee6a68169da">chSemWaitTimeout</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp, <a class="el" href="group___s_t_m8___c_o_r_e.html#gac46524873fe28f00864e5ebe155bb523">systime_t</a> time)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a wait operation on a semaphore with timeout specification. <a href="group__semaphores.html#ga0bc227311e5be3e3b6e3aee6a68169da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___s_t_m8___c_o_r_e.html#ga1e402860c42e2ceda36d0307f3aa6209">msg_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga924ec5d191bb8debe8727ae4dd5d6d03">chSemWaitTimeoutS</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp, <a class="el" href="group___s_t_m8___c_o_r_e.html#gac46524873fe28f00864e5ebe155bb523">systime_t</a> time)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a wait operation on a semaphore with timeout specification. <a href="group__semaphores.html#ga924ec5d191bb8debe8727ae4dd5d6d03"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga7ec0cbda23e49e2370e0b91f20baf05e">chSemSignal</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a signal operation on a semaphore. <a href="group__semaphores.html#ga7ec0cbda23e49e2370e0b91f20baf05e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#gaca0b70cf495a9cb7569e1cf5b07e2b3d">chSemSignalI</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a signal operation on a semaphore. <a href="group__semaphores.html#gaca0b70cf495a9cb7569e1cf5b07e2b3d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___s_t_m8___c_o_r_e.html#ga1e402860c42e2ceda36d0307f3aa6209">msg_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__semaphores.html#ga0dc7b4339506de346d67b4560b271e44">chSemSignalWait</a> (<a class="el" href="struct_semaphore.html">Semaphore</a> *sps, <a class="el" href="struct_semaphore.html">Semaphore</a> *spw)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs atomic signal and wait operations on two semaphores. <a href="group__semaphores.html#ga0dc7b4339506de346d67b4560b271e44"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Semaphores macros and structures. </p>
<p>Definition in file <a class="el" href="chsem_8h_source.html">chsem.h</a>.</p>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Sun Jul 11 13:13:02 2010 for ChibiOS/RT by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.3</small></address>
</body>
</html>