gnuk/ChibiOS_2.0.6/docs/html/group__system.html
2010-11-22 14:53:37 +09:00

526 lines
49 KiB
HTML

<!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: System Management</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.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<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><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<h1>System Management<br/>
<small>
[<a class="el" href="group__base.html">Base Kernel Services</a>]</small>
</h1> </div>
</div>
<div class="contents">
<p><div class="dynheader">
Collaboration diagram for System Management:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__system.png" border="0" alt="" usemap="#group____system"/>
<map name="group____system" id="group____system">
<area shape="rect" id="node1" href="group__base.html" title="Base Kernel Services" alt="" coords="7,5,132,32"/>
</map>
</td></tr></table></center>
</div>
</p>
<hr/><a name="_details"></a><h2>Description</h2>
<p>System related APIs and services:</p>
<ul>
<li>Initialization.</li>
<li>Locks.</li>
<li>Interrupt Handling.</li>
<li>Power Management.</li>
<li>Abnormal Termination.</li>
</ul>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
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__system.html#gad43b78f160a2c983792af3041cc4a536">chSysHalt</a>()&nbsp;&nbsp;&nbsp;port_halt()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Halts the system. <a href="#gad43b78f160a2c983792af3041cc4a536"></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__system.html#ga63044a9140cf65d2272f06e05431e161">chSysSwitchI</a>(ntp, otp)&nbsp;&nbsp;&nbsp;port_switch(ntp, otp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a context switch. <a href="#ga63044a9140cf65d2272f06e05431e161"></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__system.html#ga0f6e07fb701e2006ba40db2ede3a4b5b">chSysDisable</a>()&nbsp;&nbsp;&nbsp;port_disable()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Raises the system interrupt priority mask to the maximum level. <a href="#ga0f6e07fb701e2006ba40db2ede3a4b5b"></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__system.html#ga345a8b0ef36155654e5cf88a853365b4">chSysSuspend</a>()&nbsp;&nbsp;&nbsp;port_suspend()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Raises the system interrupt priority mask to system level. <a href="#ga345a8b0ef36155654e5cf88a853365b4"></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__system.html#ga2f54701f43490a5de272cc3d32962b51">chSysEnable</a>()&nbsp;&nbsp;&nbsp;port_enable()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lowers the system interrupt priority mask to user level. <a href="#ga2f54701f43490a5de272cc3d32962b51"></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__system.html#ga9f6573c0763d1e4e97c63c62edad6e42">chSysLock</a>()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enters the kernel lock mode. <a href="#ga9f6573c0763d1e4e97c63c62edad6e42"></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__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e">chSysUnlock</a>()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Leaves the kernel lock mode. <a href="#ga5a257fa58a09815eb64a45e2dfbdc22e"></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__system.html#gab826c6d946aa1eb839751246ea158a72">chSysLockFromIsr</a>()&nbsp;&nbsp;&nbsp;port_lock_from_isr()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enters the kernel lock mode from within an interrupt handler. <a href="#gab826c6d946aa1eb839751246ea158a72"></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__system.html#ga984fb4af1420b6a217714ed317224ec0">chSysUnlockFromIsr</a>()&nbsp;&nbsp;&nbsp;port_unlock_from_isr()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Leaves the kernel lock mode from within an interrupt handler. <a href="#ga984fb4af1420b6a217714ed317224ec0"></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__system.html#ga0d78c6e90e5f0a4eb52aaab37e45a494">CH_IRQ_PROLOGUE</a>()&nbsp;&nbsp;&nbsp;PORT_IRQ_PROLOGUE()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IRQ handler enter code. <a href="#ga0d78c6e90e5f0a4eb52aaab37e45a494"></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__system.html#ga864d6b8056d7d8f56322bbfcc8515d77">CH_IRQ_EPILOGUE</a>()&nbsp;&nbsp;&nbsp;PORT_IRQ_EPILOGUE()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IRQ handler exit code. <a href="#ga864d6b8056d7d8f56322bbfcc8515d77"></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__system.html#ga52426c607fac82b1e0ad975b367f95e9">CH_IRQ_HANDLER</a>(id)&nbsp;&nbsp;&nbsp;PORT_IRQ_HANDLER(id)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Standard normal IRQ handler declaration. <a href="#ga52426c607fac82b1e0ad975b367f95e9"></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__system.html#ga07883f8c07160bf1f95f8b8a783dbe38">CH_FAST_IRQ_HANDLER</a>(id)&nbsp;&nbsp;&nbsp;PORT_FAST_IRQ_HANDLER(id)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Standard fast IRQ handler declaration. <a href="#ga07883f8c07160bf1f95f8b8a783dbe38"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
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__system.html#gafe2c7de6567e98e487e009e81e3be10b">chSysInit</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ChibiOS/RT initialization. <a href="#gafe2c7de6567e98e487e009e81e3be10b"></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__system.html#ga1e42ee112f4a5d2c95be07d523c247be">chSysTimerHandlerI</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Handles time ticks for round robin preemption and timer increments. <a href="#ga1e42ee112f4a5d2c95be07d523c247be"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gad43b78f160a2c983792af3041cc4a536"></a><!-- doxytag: member="chsys.h::chSysHalt" ref="gad43b78f160a2c983792af3041cc4a536" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysHalt</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_halt()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Halts the system. </p>
<p>This function is invoked by the operating system when an unrecoverable error is detected, as example because a programming error in the application code that triggers an assertion while in debug mode. </p>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00045">45</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group__debug.html#ga3cfb02183cd13f939b9b666810511157">chDbgPanic()</a>.</p>
</div>
</div>
<a class="anchor" id="ga63044a9140cf65d2272f06e05431e161"></a><!-- doxytag: member="chsys.h::chSysSwitchI" ref="ga63044a9140cf65d2272f06e05431e161" args="(ntp, otp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysSwitchI</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">ntp, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">otp</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td>&nbsp;&nbsp;&nbsp;port_switch(ntp, otp)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Performs a context switch. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>ntp</em>&nbsp;</td><td>the thread to be switched in </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>otp</em>&nbsp;</td><td>the thread to be switched out </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00053">53</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group__scheduler.html#ga0257cf203e72a766a52059750cb97e6e">chSchDoRescheduleI()</a>, <a class="el" href="group__scheduler.html#ga97c1c514b755a1e71caf2f19c1ccf986">chSchGoSleepS()</a>, and <a class="el" href="group__scheduler.html#gae47a8819a21ef2d521124e76bfb37c95">chSchWakeupS()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0f6e07fb701e2006ba40db2ede3a4b5b"></a><!-- doxytag: member="chsys.h::chSysDisable" ref="ga0f6e07fb701e2006ba40db2ede3a4b5b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysDisable</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_disable()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Raises the system interrupt priority mask to the maximum level. </p>
<p>All the maskable interrupt sources are disabled regardless their hardware priority. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The implementation is architecture dependent, it may just disable the interrupts or be exactly equivalent to <code><a class="el" href="group__system.html#ga0f6e07fb701e2006ba40db2ede3a4b5b" title="Raises the system interrupt priority mask to the maximum level.">chSysDisable()</a></code>. </dd>
<dd>
Do not invoke this API from within a kernel lock. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00063">63</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga345a8b0ef36155654e5cf88a853365b4"></a><!-- doxytag: member="chsys.h::chSysSuspend" ref="ga345a8b0ef36155654e5cf88a853365b4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysSuspend</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_suspend()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Raises the system interrupt priority mask to system level. </p>
<p>The interrupt sources that should not be able to preempt the kernel are disabled, interrupt sources with higher priority are still enabled. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The implementation is architecture dependent, it may just disable the interrupts. </dd>
<dd>
Do not invoke this API from within a kernel lock. </dd>
<dd>
This API is no replacement for <code><a class="el" href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42" title="Enters the kernel lock mode.">chSysLock()</a></code>, the <code><a class="el" href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42" title="Enters the kernel lock mode.">chSysLock()</a></code> could do more than just disable the interrupts. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00076">76</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga2f54701f43490a5de272cc3d32962b51"></a><!-- doxytag: member="chsys.h::chSysEnable" ref="ga2f54701f43490a5de272cc3d32962b51" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysEnable</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_enable()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Lowers the system interrupt priority mask to user level. </p>
<p>All the interrupt sources are enabled. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The implementation is architecture dependent, it may just enable the interrupts. </dd>
<dd>
Do not invoke this API from within a kernel lock. </dd>
<dd>
This API is no replacement for <code><a class="el" href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e" title="Leaves the kernel lock mode.">chSysUnlock()</a></code>, the <code><a class="el" href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e" title="Leaves the kernel lock mode.">chSysUnlock()</a></code> could do more than just enable the interrupts. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00087">87</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group__system.html#gafe2c7de6567e98e487e009e81e3be10b">chSysInit()</a>.</p>
</div>
</div>
<a class="anchor" id="ga9f6573c0763d1e4e97c63c62edad6e42"></a><!-- doxytag: member="chsys.h::chSysLock" ref="ga9f6573c0763d1e4e97c63c62edad6e42" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysLock</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (<a class="code" href="group__scheduler.html#ga1a5fddde56420e8accd0c09c1abb32a7" title="Current thread pointer access macro.">currp</a>-&gt;p_locks++ == 0) \
<a class="code" href="group__core.html#gad9aed313dfdafb6e9c58691af424fcb4" title="Kernel-lock action.">port_lock</a>(); \
}
</pre></div>
<p>Enters the kernel lock mode. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The use of kernel lock mode is not recommended in the user code, it is a better idea to use the semaphores or mutexes instead. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__config.html#gacc5d718a9ef515a18211ff2bcd0a31dc" title="Nested locks.">CH_USE_NESTED_LOCKS</a> </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00097">97</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___a_d_c.html#ga92f8b4434b8199323b1469e0479de7f8">adcStart()</a>, <a class="el" href="group___a_d_c.html#gadb9905e3fcd0f053ca1e07e9686bf641">adcStartConversion()</a>, <a class="el" href="group___a_d_c.html#ga3caf934a28b65e6a5eda3e882ca06845">adcStop()</a>, <a class="el" href="group___a_d_c.html#gabce14d8f240e85715cded02c85b6585a">adcStopConversion()</a>, <a class="el" href="group___a_d_c.html#ga026ac46dfe36031ab177e35f3aff5b09">adcWaitConversion()</a>, <a class="el" href="group___c_a_n.html#ga377a78b04ad6733e24b31615b76cdada">canGetAndClearFlags()</a>, <a class="el" href="group___c_a_n.html#ga557d845167f6ab4f224b036860411db5">canReceive()</a>, <a class="el" href="group___c_a_n.html#ga97caf4f277c09588c225ea2328a74cba">canSleep()</a>, <a class="el" href="group___c_a_n.html#ga05d2448864b2cae4674ed7e6f3c576b8">canStart()</a>, <a class="el" href="group___c_a_n.html#ga4e89a7d246119e077d27431a02586133">canStop()</a>, <a class="el" href="group___c_a_n.html#gad9c686d19b4319ef586af3631b779c6c">canTransmit()</a>, <a class="el" href="group___c_a_n.html#ga09737d4ae5be724bf791a309e8a28dff">canWakeup()</a>, <a class="el" href="group__condvars.html#ga60c24a8060a884313efe82b8404e77f6">chCondBroadcast()</a>, <a class="el" href="group__condvars.html#gadddadb68e2a2ce061c7df0d647da9996">chCondSignal()</a>, <a class="el" href="group__condvars.html#ga466f912bc9b09b133fae862993004ffe">chCondWait()</a>, <a class="el" href="group__condvars.html#ga07a0c55ac1002a64e8c7f9b7e3ca1caf">chCondWaitTimeout()</a>, <a class="el" href="group__memcore.html#ga5394bda5b809ecf6b80b041b6b9ebaf4">chCoreAlloc()</a>, <a class="el" href="group__events.html#ga44015af4dd20f74b0f73824ff1c1b2f4">chEvtBroadcast()</a>, <a class="el" href="group__events.html#ga76f41b9668c3f1adafc516a8f92b9cad">chEvtClear()</a>, <a class="el" href="group__events.html#ga94f14b6063f42b9be79a7dabde18232d">chEvtPend()</a>, <a class="el" href="group__events.html#ga4002600fe552128aaf96a6a1d3ada3ee">chEvtRegisterMask()</a>, <a class="el" href="group__events.html#ga75a812ae99ce83a3689f51d797a038de">chEvtSignal()</a>, <a class="el" href="group__events.html#ga68d15e1c7e12e96edd40069a27981d38">chEvtUnregister()</a>, <a class="el" href="group__events.html#ga8c5c6bf310a08cdc836d23f98a87dbf5">chEvtWaitAll()</a>, <a class="el" href="group__events.html#ga90d702300eecee3d05f83e95b155c3ee">chEvtWaitAllTimeout()</a>, <a class="el" href="group__events.html#gabd731d3ed2f037b2409e370676575f8d">chEvtWaitAny()</a>, <a class="el" href="group__events.html#gaf690406ccc833e2c9235e7e2041a6715">chEvtWaitAnyTimeout()</a>, <a class="el" href="group__events.html#ga77651e22578713ebe355c1213286c2e9">chEvtWaitOne()</a>, <a class="el" href="group__events.html#ga2944a7fc82e7cc15537f5a7c04f457d3">chEvtWaitOneTimeout()</a>, <a class="el" href="group__io__queues.html#ga142d0e885ac3a695f5f033a65f49abd0">chIQGetTimeout()</a>, <a class="el" href="group__io__queues.html#gaddf6fc39af7d905c9f23afde14d8d764">chIQReadTimeout()</a>, <a class="el" href="group__mailboxes.html#ga61543bf11d0caa737f5818c67548c055">chMBFetch()</a>, <a class="el" href="group__mailboxes.html#ga9bafcc634765886f59cf68c0e35d070d">chMBPost()</a>, <a class="el" href="group__mailboxes.html#ga55c5b8890b78127bc1fa5a324252d5e6">chMBPostAhead()</a>, <a class="el" href="group__mailboxes.html#ga4199e224456395c3dbc74dbc889dff94">chMBReset()</a>, <a class="el" href="group__messages.html#ga65dda189b03b238412301ce5d80bfcf4">chMsgGet()</a>, <a class="el" href="group__messages.html#ga19a54b3b4b0e3677c47d650a3be3c7aa">chMsgRelease()</a>, <a class="el" href="group__messages.html#ga29a48a438e97dc47cb798a84e13764cb">chMsgSend()</a>, <a class="el" href="group__messages.html#gae68fefbf9d0404bbf56ae354961fae41">chMsgWait()</a>, <a class="el" href="group__mutexes.html#gafa06b82e3496c44eb7bf31d9f1b655ba">chMtxLock()</a>, <a class="el" href="group__mutexes.html#gaada14e216460dc55e1816234168cf95c">chMtxTryLock()</a>, <a class="el" href="group__mutexes.html#gae9ae07165126c9f6c0ce0b17bdb53669">chMtxUnlock()</a>, <a class="el" href="group__mutexes.html#ga853b4ced43d22fb5d82678dd2f0aba75">chMtxUnlockAll()</a>, <a class="el" href="group__io__queues.html#ga3df1926602eb698119990b311b097ad9">chOQPutTimeout()</a>, <a class="el" href="group__io__queues.html#ga1e90d41fa021107d72b1bed81186aae8">chOQWriteTimeout()</a>, <a class="el" href="group__pools.html#gab86190d70893fe708c75570af6720bd5">chPoolAlloc()</a>, <a class="el" href="group__pools.html#ga978f8d038e8e981bf9e5a104b81c6cb6">chPoolFree()</a>, <a class="el" href="group__registry.html#ga55c0a485b40cf4acbfce0dd333f28513">chRegFirstThread()</a>, <a class="el" href="group__registry.html#gaefff43a49fb7888a596319d67cf01dab">chRegNextThread()</a>, <a class="el" href="group__semaphores.html#ga58e266e609cfd3dbc67f299b3ae9debb">chSemReset()</a>, <a class="el" href="group__semaphores.html#ga7ec0cbda23e49e2370e0b91f20baf05e">chSemSignal()</a>, <a class="el" href="group__semaphores.html#ga0dc7b4339506de346d67b4560b271e44">chSemSignalWait()</a>, <a class="el" href="group__semaphores.html#gabc8f7e509870e9b0527a6a68fad71425">chSemWait()</a>, <a class="el" href="group__semaphores.html#ga0bc227311e5be3e3b6e3aee6a68169da">chSemWaitTimeout()</a>, <a class="el" href="group__threads.html#gabefc5734beaf29ae0bcd52cd41744930">chThdAddRef()</a>, <a class="el" href="group__threads.html#ga50b84e3e82a4e09c1066e1d422e4c780">chThdCreateFromHeap()</a>, <a class="el" href="group__threads.html#gad3ccc1a6f054c543258ed2fe97ed2f58">chThdCreateFromMemoryPool()</a>, <a class="el" href="group__threads.html#ga048e588238dd336c6059133b3d0c3435">chThdCreateStatic()</a>, <a class="el" href="group__threads.html#ga24ab3a3a4d70214ee360867a1c3c75ac">chThdExit()</a>, <a class="el" href="group__threads.html#gaa22f80040cf192015be4607f31a0ac80">chThdRelease()</a>, <a class="el" href="group__threads.html#ga2c1ce2be73cd177af7e577b282232a7d">chThdResume()</a>, <a class="el" href="group__threads.html#ga5a5d9388c64e4c1a3aec129d2831eefe">chThdSetPriority()</a>, <a class="el" href="group__threads.html#ga8b10a49e2ec522a5ddecabdc453afcab">chThdSleep()</a>, <a class="el" href="group__threads.html#ga9e6e2f8d46d415e8f0862daf0be1d984">chThdSleepUntil()</a>, <a class="el" href="group__threads.html#ga7ea7371fa41598ebd523622587ce3f22">chThdTerminate()</a>, <a class="el" href="group__threads.html#ga94a5727ecdbe0f738dfc8e1ede1c3409">chThdWait()</a>, <a class="el" href="group__threads.html#gacb0a8f22a8358487eaebab3c84b1c4a1">chThdYield()</a>, <a class="el" href="classchibios__rt_1_1_system.html#a464d3fc171938b9387872fc9cdaa78a6">chibios_rt::System::Lock()</a>, <a class="el" href="group___m_a_c.html#ga151a33674ef86c2403ac7797fa87805c">macWaitReceiveDescriptor()</a>, <a class="el" href="group___m_a_c.html#ga7304721038db1d7c0cb616c9c4d3f0ce">macWaitTransmitDescriptor()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga9ff4f12fa759c3cb4aca2b64b11f1d22">mmcConnect()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gab90f252316351a93ec38b11f7eaf1f16">mmcDisconnect()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga7e02b9210a8d3d9f8465b8000983dadf">mmcSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga9ce0adb181138efc1f835aff6d8eb203">mmcSequentialWrite()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga076506461b42641a9fe632cc3e72dab5">mmcStart()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga6c62caa5d008460e7319fb2c36518ddc">mmcStartSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga8031c8222f92a0c6632b36ff943fe825">mmcStartSequentialWrite()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga27833cde77794f914e4802c7e65281a5">mmcStop()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gaf55b97f76be81f4ce5cde415f3131400">mmcStopSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gae84abdd53540f03262822aa1f9a213b5">mmcStopSequentialWrite()</a>, <a class="el" href="group___p_w_m.html#gac2679d11833a4ea9df5a9ed2e4a2c2e7">pwmDisableChannel()</a>, <a class="el" href="group___p_w_m.html#gafd6c45693467da77ab13edca8420620d">pwmEnableChannel()</a>, <a class="el" href="group___p_w_m.html#ga9c14dc1b026c78809440281786aceda3">pwmStart()</a>, <a class="el" href="group___p_w_m.html#ga8a4d0d8a47883efe286a332cade14080">pwmStop()</a>, <a class="el" href="group___s_e_r_i_a_l.html#gaa83db03502662f959e29b9fae964512d">sdGetAndClearFlags()</a>, <a class="el" href="group___s_e_r_i_a_l.html#ga5e77658b4f3b559927705dc8fbfbdfad">sdStart()</a>, <a class="el" href="group___s_e_r_i_a_l.html#gacb106a30f8007afdf9eeaf8681dbd3cf">sdStop()</a>, <a class="el" href="group___s_p_i.html#ga00809152c869db80192aa3e04266a99a">spiSelect()</a>, <a class="el" href="group___s_p_i.html#ga6752c9f736f8de774a5bef6dfe2aae2e">spiStart()</a>, <a class="el" href="group___s_p_i.html#gad3a359eea03e68e95899886ae93a06e4">spiStop()</a>, and <a class="el" href="group___s_p_i.html#gae291c012872da9c89dec23581f701b5f">spiUnselect()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5a257fa58a09815eb64a45e2dfbdc22e"></a><!-- doxytag: member="chsys.h::chSysUnlock" ref="ga5a257fa58a09815eb64a45e2dfbdc22e" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysUnlock</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
<span class="keywordflow">if</span> (--<a class="code" href="group__scheduler.html#ga1a5fddde56420e8accd0c09c1abb32a7" title="Current thread pointer access macro.">currp</a>-&gt;p_locks == 0) \
<a class="code" href="group__core.html#ga242f36ee65eb9b19258654f7a3b63f87" title="Kernel-unlock action.">port_unlock</a>(); \
}
</pre></div>
<p>Leaves the kernel lock mode. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The use of kernel lock mode is not recommended in the user code, it is a better idea to use the semaphores or mutexes instead. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__config.html#gacc5d718a9ef515a18211ff2bcd0a31dc" title="Nested locks.">CH_USE_NESTED_LOCKS</a> </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00114">114</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___a_d_c.html#ga92f8b4434b8199323b1469e0479de7f8">adcStart()</a>, <a class="el" href="group___a_d_c.html#gadb9905e3fcd0f053ca1e07e9686bf641">adcStartConversion()</a>, <a class="el" href="group___a_d_c.html#ga3caf934a28b65e6a5eda3e882ca06845">adcStop()</a>, <a class="el" href="group___a_d_c.html#gabce14d8f240e85715cded02c85b6585a">adcStopConversion()</a>, <a class="el" href="group___a_d_c.html#ga026ac46dfe36031ab177e35f3aff5b09">adcWaitConversion()</a>, <a class="el" href="group___c_a_n.html#ga377a78b04ad6733e24b31615b76cdada">canGetAndClearFlags()</a>, <a class="el" href="group___c_a_n.html#ga557d845167f6ab4f224b036860411db5">canReceive()</a>, <a class="el" href="group___c_a_n.html#ga97caf4f277c09588c225ea2328a74cba">canSleep()</a>, <a class="el" href="group___c_a_n.html#ga05d2448864b2cae4674ed7e6f3c576b8">canStart()</a>, <a class="el" href="group___c_a_n.html#ga4e89a7d246119e077d27431a02586133">canStop()</a>, <a class="el" href="group___c_a_n.html#gad9c686d19b4319ef586af3631b779c6c">canTransmit()</a>, <a class="el" href="group___c_a_n.html#ga09737d4ae5be724bf791a309e8a28dff">canWakeup()</a>, <a class="el" href="group__condvars.html#ga60c24a8060a884313efe82b8404e77f6">chCondBroadcast()</a>, <a class="el" href="group__condvars.html#gadddadb68e2a2ce061c7df0d647da9996">chCondSignal()</a>, <a class="el" href="group__condvars.html#ga466f912bc9b09b133fae862993004ffe">chCondWait()</a>, <a class="el" href="group__condvars.html#ga07a0c55ac1002a64e8c7f9b7e3ca1caf">chCondWaitTimeout()</a>, <a class="el" href="group__memcore.html#ga5394bda5b809ecf6b80b041b6b9ebaf4">chCoreAlloc()</a>, <a class="el" href="group__events.html#ga44015af4dd20f74b0f73824ff1c1b2f4">chEvtBroadcast()</a>, <a class="el" href="group__events.html#ga76f41b9668c3f1adafc516a8f92b9cad">chEvtClear()</a>, <a class="el" href="group__events.html#ga94f14b6063f42b9be79a7dabde18232d">chEvtPend()</a>, <a class="el" href="group__events.html#ga4002600fe552128aaf96a6a1d3ada3ee">chEvtRegisterMask()</a>, <a class="el" href="group__events.html#ga75a812ae99ce83a3689f51d797a038de">chEvtSignal()</a>, <a class="el" href="group__events.html#ga68d15e1c7e12e96edd40069a27981d38">chEvtUnregister()</a>, <a class="el" href="group__events.html#ga8c5c6bf310a08cdc836d23f98a87dbf5">chEvtWaitAll()</a>, <a class="el" href="group__events.html#ga90d702300eecee3d05f83e95b155c3ee">chEvtWaitAllTimeout()</a>, <a class="el" href="group__events.html#gabd731d3ed2f037b2409e370676575f8d">chEvtWaitAny()</a>, <a class="el" href="group__events.html#gaf690406ccc833e2c9235e7e2041a6715">chEvtWaitAnyTimeout()</a>, <a class="el" href="group__events.html#ga77651e22578713ebe355c1213286c2e9">chEvtWaitOne()</a>, <a class="el" href="group__events.html#ga2944a7fc82e7cc15537f5a7c04f457d3">chEvtWaitOneTimeout()</a>, <a class="el" href="group__io__queues.html#ga142d0e885ac3a695f5f033a65f49abd0">chIQGetTimeout()</a>, <a class="el" href="group__io__queues.html#gaddf6fc39af7d905c9f23afde14d8d764">chIQReadTimeout()</a>, <a class="el" href="group__mailboxes.html#ga61543bf11d0caa737f5818c67548c055">chMBFetch()</a>, <a class="el" href="group__mailboxes.html#ga9bafcc634765886f59cf68c0e35d070d">chMBPost()</a>, <a class="el" href="group__mailboxes.html#ga55c5b8890b78127bc1fa5a324252d5e6">chMBPostAhead()</a>, <a class="el" href="group__mailboxes.html#ga4199e224456395c3dbc74dbc889dff94">chMBReset()</a>, <a class="el" href="group__messages.html#ga65dda189b03b238412301ce5d80bfcf4">chMsgGet()</a>, <a class="el" href="group__messages.html#ga19a54b3b4b0e3677c47d650a3be3c7aa">chMsgRelease()</a>, <a class="el" href="group__messages.html#ga29a48a438e97dc47cb798a84e13764cb">chMsgSend()</a>, <a class="el" href="group__messages.html#gae68fefbf9d0404bbf56ae354961fae41">chMsgWait()</a>, <a class="el" href="group__mutexes.html#gafa06b82e3496c44eb7bf31d9f1b655ba">chMtxLock()</a>, <a class="el" href="group__mutexes.html#gaada14e216460dc55e1816234168cf95c">chMtxTryLock()</a>, <a class="el" href="group__mutexes.html#gae9ae07165126c9f6c0ce0b17bdb53669">chMtxUnlock()</a>, <a class="el" href="group__mutexes.html#ga853b4ced43d22fb5d82678dd2f0aba75">chMtxUnlockAll()</a>, <a class="el" href="group__io__queues.html#ga3df1926602eb698119990b311b097ad9">chOQPutTimeout()</a>, <a class="el" href="group__io__queues.html#ga1e90d41fa021107d72b1bed81186aae8">chOQWriteTimeout()</a>, <a class="el" href="group__pools.html#gab86190d70893fe708c75570af6720bd5">chPoolAlloc()</a>, <a class="el" href="group__pools.html#ga978f8d038e8e981bf9e5a104b81c6cb6">chPoolFree()</a>, <a class="el" href="group__registry.html#ga55c0a485b40cf4acbfce0dd333f28513">chRegFirstThread()</a>, <a class="el" href="group__registry.html#gaefff43a49fb7888a596319d67cf01dab">chRegNextThread()</a>, <a class="el" href="group__semaphores.html#ga58e266e609cfd3dbc67f299b3ae9debb">chSemReset()</a>, <a class="el" href="group__semaphores.html#ga7ec0cbda23e49e2370e0b91f20baf05e">chSemSignal()</a>, <a class="el" href="group__semaphores.html#ga0dc7b4339506de346d67b4560b271e44">chSemSignalWait()</a>, <a class="el" href="group__semaphores.html#gabc8f7e509870e9b0527a6a68fad71425">chSemWait()</a>, <a class="el" href="group__semaphores.html#ga0bc227311e5be3e3b6e3aee6a68169da">chSemWaitTimeout()</a>, <a class="el" href="group__threads.html#gabefc5734beaf29ae0bcd52cd41744930">chThdAddRef()</a>, <a class="el" href="group__threads.html#ga50b84e3e82a4e09c1066e1d422e4c780">chThdCreateFromHeap()</a>, <a class="el" href="group__threads.html#gad3ccc1a6f054c543258ed2fe97ed2f58">chThdCreateFromMemoryPool()</a>, <a class="el" href="group__threads.html#ga048e588238dd336c6059133b3d0c3435">chThdCreateStatic()</a>, <a class="el" href="group__threads.html#gaa22f80040cf192015be4607f31a0ac80">chThdRelease()</a>, <a class="el" href="group__threads.html#ga2c1ce2be73cd177af7e577b282232a7d">chThdResume()</a>, <a class="el" href="group__threads.html#ga5a5d9388c64e4c1a3aec129d2831eefe">chThdSetPriority()</a>, <a class="el" href="group__threads.html#ga8b10a49e2ec522a5ddecabdc453afcab">chThdSleep()</a>, <a class="el" href="group__threads.html#ga9e6e2f8d46d415e8f0862daf0be1d984">chThdSleepUntil()</a>, <a class="el" href="group__threads.html#ga7ea7371fa41598ebd523622587ce3f22">chThdTerminate()</a>, <a class="el" href="group__threads.html#ga94a5727ecdbe0f738dfc8e1ede1c3409">chThdWait()</a>, <a class="el" href="group__threads.html#gacb0a8f22a8358487eaebab3c84b1c4a1">chThdYield()</a>, <a class="el" href="group___m_a_c.html#ga151a33674ef86c2403ac7797fa87805c">macWaitReceiveDescriptor()</a>, <a class="el" href="group___m_a_c.html#ga7304721038db1d7c0cb616c9c4d3f0ce">macWaitTransmitDescriptor()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga9ff4f12fa759c3cb4aca2b64b11f1d22">mmcConnect()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gab90f252316351a93ec38b11f7eaf1f16">mmcDisconnect()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga7e02b9210a8d3d9f8465b8000983dadf">mmcSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga9ce0adb181138efc1f835aff6d8eb203">mmcSequentialWrite()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga076506461b42641a9fe632cc3e72dab5">mmcStart()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga6c62caa5d008460e7319fb2c36518ddc">mmcStartSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga8031c8222f92a0c6632b36ff943fe825">mmcStartSequentialWrite()</a>, <a class="el" href="group___m_m_c___s_p_i.html#ga27833cde77794f914e4802c7e65281a5">mmcStop()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gaf55b97f76be81f4ce5cde415f3131400">mmcStopSequentialRead()</a>, <a class="el" href="group___m_m_c___s_p_i.html#gae84abdd53540f03262822aa1f9a213b5">mmcStopSequentialWrite()</a>, <a class="el" href="group___p_w_m.html#gac2679d11833a4ea9df5a9ed2e4a2c2e7">pwmDisableChannel()</a>, <a class="el" href="group___p_w_m.html#gafd6c45693467da77ab13edca8420620d">pwmEnableChannel()</a>, <a class="el" href="group___p_w_m.html#ga9c14dc1b026c78809440281786aceda3">pwmStart()</a>, <a class="el" href="group___p_w_m.html#ga8a4d0d8a47883efe286a332cade14080">pwmStop()</a>, <a class="el" href="group___s_e_r_i_a_l.html#gaa83db03502662f959e29b9fae964512d">sdGetAndClearFlags()</a>, <a class="el" href="group___s_e_r_i_a_l.html#ga5e77658b4f3b559927705dc8fbfbdfad">sdStart()</a>, <a class="el" href="group___s_e_r_i_a_l.html#gacb106a30f8007afdf9eeaf8681dbd3cf">sdStop()</a>, <a class="el" href="group___s_p_i.html#ga00809152c869db80192aa3e04266a99a">spiSelect()</a>, <a class="el" href="group___s_p_i.html#ga6752c9f736f8de774a5bef6dfe2aae2e">spiStart()</a>, <a class="el" href="group___s_p_i.html#gad3a359eea03e68e95899886ae93a06e4">spiStop()</a>, <a class="el" href="group___s_p_i.html#gae291c012872da9c89dec23581f701b5f">spiUnselect()</a>, and <a class="el" href="classchibios__rt_1_1_system.html#affaa69004bd8f952aebce80cffff673f">chibios_rt::System::Unlock()</a>.</p>
</div>
</div>
<a class="anchor" id="gab826c6d946aa1eb839751246ea158a72"></a><!-- doxytag: member="chsys.h::chSysLockFromIsr" ref="gab826c6d946aa1eb839751246ea158a72" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysLockFromIsr</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_lock_from_isr()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enters the kernel lock mode from within an interrupt handler. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This API may do nothing on some architectures, it is required because on ports that support preemptable interrupt handlers it is required to raise the interrupt mask to the same level of the system mutual exclusion zone.<br/>
It is good practice to invoke this API before invoking any I-class syscall from an interrupt handler. </dd>
<dd>
This API must be invoked exclusively from interrupt handlers. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00133">133</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___s_t_m32___a_d_c.html#ga727ca25370379b53e77a820e7bfee540">CH_IRQ_HANDLER()</a>.</p>
</div>
</div>
<a class="anchor" id="ga984fb4af1420b6a217714ed317224ec0"></a><!-- doxytag: member="chsys.h::chSysUnlockFromIsr" ref="ga984fb4af1420b6a217714ed317224ec0" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define chSysUnlockFromIsr</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;port_unlock_from_isr()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Leaves the kernel lock mode from within an interrupt handler. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This API may do nothing on some architectures, it is required because on ports that support preemptable interrupt handlers it is required to raise the interrupt mask to the same level of the system mutual exclusion zone.<br/>
It is good practice to invoke this API after invoking any I-class syscall from an interrupt handler. </dd>
<dd>
This API must be invoked exclusively from interrupt handlers. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00146">146</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___s_t_m32___a_d_c.html#ga727ca25370379b53e77a820e7bfee540">CH_IRQ_HANDLER()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0d78c6e90e5f0a4eb52aaab37e45a494"></a><!-- doxytag: member="chsys.h::CH_IRQ_PROLOGUE" ref="ga0d78c6e90e5f0a4eb52aaab37e45a494" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CH_IRQ_PROLOGUE</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;PORT_IRQ_PROLOGUE()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>IRQ handler enter code. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Usually IRQ handlers functions are also declared naked. </dd>
<dd>
On some architectures this macro can be empty. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00153">153</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___s_t_m32___a_d_c.html#ga727ca25370379b53e77a820e7bfee540">CH_IRQ_HANDLER()</a>.</p>
</div>
</div>
<a class="anchor" id="ga864d6b8056d7d8f56322bbfcc8515d77"></a><!-- doxytag: member="chsys.h::CH_IRQ_EPILOGUE" ref="ga864d6b8056d7d8f56322bbfcc8515d77" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CH_IRQ_EPILOGUE</td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;PORT_IRQ_EPILOGUE()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>IRQ handler exit code. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Usually IRQ handlers function are also declared naked. </dd>
<dd>
This macro usually performs the final reschedule by using <code>chSchRescRequiredI()</code> and <code><a class="el" href="group__scheduler.html#ga0257cf203e72a766a52059750cb97e6e" title="Switches to the first thread on the runnable queue.">chSchDoRescheduleI()</a></code>. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00161">161</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
<p>Referenced by <a class="el" href="group___s_t_m32___a_d_c.html#ga727ca25370379b53e77a820e7bfee540">CH_IRQ_HANDLER()</a>.</p>
</div>
</div>
<a class="anchor" id="ga52426c607fac82b1e0ad975b367f95e9"></a><!-- doxytag: member="chsys.h::CH_IRQ_HANDLER" ref="ga52426c607fac82b1e0ad975b367f95e9" args="(id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CH_IRQ_HANDLER</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">id</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;PORT_IRQ_HANDLER(id)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Standard normal IRQ handler declaration. </p>
<dl class="note"><dt><b>Note:</b></dt><dd><code>id</code> can be a function name or a vector number depending on the port implementation. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00168">168</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga07883f8c07160bf1f95f8b8a783dbe38"></a><!-- doxytag: member="chsys.h::CH_FAST_IRQ_HANDLER" ref="ga07883f8c07160bf1f95f8b8a783dbe38" args="(id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CH_FAST_IRQ_HANDLER</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">id</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;PORT_FAST_IRQ_HANDLER(id)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Standard fast IRQ handler declaration. </p>
<dl class="note"><dt><b>Note:</b></dt><dd><code>id</code> can be a function name or a vector number depending on the port implementation. </dd>
<dd>
Not all architectures support fast interrupts. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8h_source.html#l00176">176</a> of file <a class="el" href="chsys_8h_source.html">chsys.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafe2c7de6567e98e487e009e81e3be10b"></a><!-- doxytag: member="chsys.h::chSysInit" ref="gafe2c7de6567e98e487e009e81e3be10b" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void chSysInit </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>ChibiOS/RT initialization. </p>
<p>After executing this function the current instructions stream becomes the main thread. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Interrupts should be still disabled when <code><a class="el" href="group__system.html#gafe2c7de6567e98e487e009e81e3be10b" title="ChibiOS/RT initialization.">chSysInit()</a></code> is invoked and are internally enabled. </dd>
<dd>
The main thread is created with priority <code>NORMALPRIO</code>. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8c_source.html#l00073">73</a> of file <a class="el" href="chsys_8c_source.html">chsys.c</a>.</p>
<p>References <a class="el" href="group__system.html#ga2f54701f43490a5de272cc3d32962b51">chSysEnable</a>, <a class="el" href="group__threads.html#ga048e588238dd336c6059133b3d0c3435">chThdCreateStatic()</a>, <a class="el" href="group__memcore.html#ga4dc59d68e345710573420dca5daa241c">core_init()</a>, <a class="el" href="group__scheduler.html#ga1a5fddde56420e8accd0c09c1abb32a7">currp</a>, <a class="el" href="group__heaps.html#ga7e7a6625a49b6a560a47ae7575575264">heap_init()</a>, <a class="el" href="group__scheduler.html#gacfbd3f4098069329a23d7ec54a7fb8ab">IDLEPRIO</a>, <a class="el" href="group__threads.html#ga4f6ae58bb3cedfc03aacde6d49e49d35">init_thread()</a>, <a class="el" href="group__scheduler.html#gad6a6b28f0c1cf8e0da714ef771fb90a0">NORMALPRIO</a>, <a class="el" href="group__core.html#gad8478867d6441d9d94f92819688f15c1">port_init()</a>, <a class="el" href="group__scheduler.html#gab258cc2856e5f6bb125907cc23358fbd">scheduler_init()</a>, <a class="el" href="group__scheduler.html#ga226bd98a30b2db31dbb1ecc572c18da2">setcurrp</a>, <a class="el" href="group__debug.html#ga5ef5d43e7c59f0ee9c490ea4e423c008">trace_init()</a>, and <a class="el" href="group__time.html#ga3f64863d042de0de89233bfeabe39b62">vt_init()</a>.</p>
<p>Referenced by <a class="el" href="classchibios__rt_1_1_system.html#a368a84ccf6f537f7ba732829cbb29281">chibios_rt::System::Init()</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group__system_gafe2c7de6567e98e487e009e81e3be10b_cgraph.png" border="0" usemap="#group__system_gafe2c7de6567e98e487e009e81e3be10b_cgraph" alt=""/></div>
<map name="group__system_gafe2c7de6567e98e487e009e81e3be10b_cgraph" id="group__system_gafe2c7de6567e98e487e009e81e3be10b_cgraph">
<area shape="rect" id="node3" href="group__threads.html#ga048e588238dd336c6059133b3d0c3435" title="Creates a new thread into a static memory area." alt="" coords="121,56,231,83"/>
<area shape="rect" id="node9" href="group__threads.html#ga4f6ae58bb3cedfc03aacde6d49e49d35" title="Initializes a thread structure." alt="" coords="427,81,499,108"/>
<area shape="rect" id="node11" href="group__memcore.html#ga4dc59d68e345710573420dca5daa241c" title="Low level memory manager initialization." alt="" coords="145,157,207,184"/>
<area shape="rect" id="node13" href="group__heaps.html#ga7e7a6625a49b6a560a47ae7575575264" title="Initializes the default heap." alt="" coords="144,208,208,235"/>
<area shape="rect" id="node20" href="group__core.html#gad8478867d6441d9d94f92819688f15c1" title="Port&#45;related initialization code." alt="" coords="147,259,205,285"/>
<area shape="rect" id="node22" href="group__scheduler.html#gab258cc2856e5f6bb125907cc23358fbd" title="Scheduler initialization." alt="" coords="132,309,220,336"/>
<area shape="rect" id="node24" href="group__debug.html#ga5ef5d43e7c59f0ee9c490ea4e423c008" title="Trace circular buffer subsystem initialization." alt="" coords="143,360,209,387"/>
<area shape="rect" id="node26" href="group__time.html#ga3f64863d042de0de89233bfeabe39b62" title="Virtual Timers initialization." alt="" coords="151,411,201,437"/>
<area shape="rect" id="node5" href="group__scheduler.html#gae47a8819a21ef2d521124e76bfb37c95" title="Wakes up a thread." alt="" coords="280,5,379,32"/>
<area shape="rect" id="node7" href="group__threads.html#gac6de13d4044b32d3ae9e2066b5d4c030" title="Creates a new thread into a static memory area." alt="" coords="287,56,372,83"/>
<area shape="rect" id="node15" href="group__mutexes.html#gac55fe4d05aa6bbeb31594193d2e4d2b6" title="Initializes s Mutex structure." alt="" coords="297,183,361,209"/>
<area shape="rect" id="node17" href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58" title="Initializes a semaphore with the specified counter value." alt="" coords="296,233,363,260"/>
</map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga1e42ee112f4a5d2c95be07d523c247be"></a><!-- doxytag: member="chsys.h::chSysTimerHandlerI" ref="ga1e42ee112f4a5d2c95be07d523c247be" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void chSysTimerHandlerI </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Handles time ticks for round robin preemption and timer increments. </p>
<p>Decrements the remaining time quantum of the running thread and preempts it when the quantum is used up. Increments system time and manages the timers.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The frequency of the timer determines the system tick granularity and, together with the <code>CH_TIME_QUANTUM</code> macro, the round robin interval. </dd></dl>
<p>Definition at line <a class="el" href="chsys_8c_source.html#l00111">111</a> of file <a class="el" href="chsys_8c_source.html">chsys.c</a>.</p>
<p>References <a class="el" href="group__time.html#ga3cc8210175b310d62e2043f752ccafee">chVTDoTickI</a>, <a class="el" href="group__scheduler.html#ga1a5fddde56420e8accd0c09c1abb32a7">currp</a>, and <a class="el" href="group__scheduler.html#ga752cd9dbf0dc458b8b532182836ca38d">rlist</a>.</p>
<p>Referenced by <a class="el" href="group___a_r_m_c_mx___v6_m___c_o_r_e.html#ga13ce719bfc3197594c741fab5d09ae0c">CH_IRQ_HANDLER()</a>.</p>
</div>
</div>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Sun Oct 24 2010 09:40:46 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.7.1</small></address>
</body>
</html>