⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compat-uitron-over-ecos.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- This material may be distributed only subject to the terms      --><!-- and conditions set forth in the Open Publication License, v1.0  --><!-- or later (the latest version is presently available at          --><!-- http://www.opencontent.org/openpub/).                           --><!-- Distribution of the work or derivative of the work in any       --><!-- standard (paper) book form is prohibited unless prior           --><!-- permission is obtained from the copyright holder.               --><HTML><HEAD><TITLE>礗TRON and eCos</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="礗TRON API"HREF="compat-uitron-microitron-api.html"><LINKREL="PREVIOUS"TITLE="礗TRON API"HREF="compat-uitron-microitron-api.html"><LINKREL="NEXT"TITLE="Task Management Functions"HREF="compat-uitron-task-management-functions.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="compat-uitron-microitron-api.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 32. &micro;ITRON API</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="compat-uitron-task-management-functions.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="COMPAT-UITRON-OVER-ECOS">&micro;ITRON and <SPANCLASS="emphasis"><ICLASS="EMPHASIS">eCos</I></SPAN></H1><P>The <SPANCLASS="emphasis"><ICLASS="EMPHASIS">eCos</I></SPAN> kernel implements the functionalityused by the &micro;ITRON compatibility subsystem.The configuration of the kernel influences the behavior of &micro;ITRONprograms.</P><P>In particular, the default configuration has time slicing(also known as round-robin scheduling) switched on; this means thata task can be moved from <TTCLASS="VARNAME">RUN</TT> stateto <TTCLASS="VARNAME">READY</TT> state at any time, inorder that one of its peers may run. This is not strictly conformantto the &micro;ITRON specification, whichstates that timeslicing may be implemented by periodically issuinga <TTCLASS="LITERAL">rot_rdq(0)</TT> call fromwithin a periodic task or cyclic handler; otherwise it is expectedthat a task runs until it is pre-empted in consequence of synchronizationor communication calls it makes, or the effects of an interruptor other external event on a higher priority task cause that taskto become <TTCLASS="VARNAME">READY</TT>. To disable timeslicingfunctionality in the kernel and &micro;ITRONcompatibility environment, please disable the <TTCLASS="LITERAL">CYGSEM_KERNEL_SCHED_TIMESLICE</TT>configuration option in the kernel package. A description of kernelscheduling is in <AHREF="kernel-overview.html">Kernel Overview</A>. </P><P>For another example, the semantics of task queueing when waitingon a synchronization object depend solely on the way the underlyingkernel is configured. As discussed above, the multi-level queuescheduler is the only one which is &micro;ITRONcompliant, and it queues waiting tasks in FIFO order. Future releasesof that scheduler might be configurable to support priority orderingof task queues. Other schedulers might be different again: for examplethe bitmap scheduler can be used with the &micro;ITRONcompatibility layer, even though it only allows one task at eachpriority and as such is not &micro;ITRONcompliant, but it supports only priority ordering of task queues.So which queueing scheme is supported is not really a property ofthe &micro;ITRON compatibility layer; itdepends on the kernel. </P><P>In this version of the &micro;ITRONcompatibility layer, the calls to disable and enable schedulingand interrupts (<TTCLASS="FUNCTION">dis_dsp()</TT>,<TTCLASS="FUNCTION">ena_dsp()</TT>, <TTCLASS="FUNCTION">loc_cpu()</TT>and <TTCLASS="FUNCTION">unl_cpu()</TT>)call underlying kernel functions; in particular, the <TTCLASS="FUNCTION">xxx_dsp()</TT> functionslock the scheduler entirely, which prevents dispatching of DSRs; functionsimplemented by DSRs include clock counters and alarm timers. Thus time &#8220;stops&#8221; whiledispatching is disabled with <TTCLASS="FUNCTION">dis_dsp()</TT>. </P><P>Like all parts of the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">eCos</I></SPAN> system, thedetailed semantics of the &micro;ITRON layerare dependent on its configuration and the configuration of other componentsthat it uses. The &micro;ITRON configurationoptions are all defined in the file <TTCLASS="FILENAME">pkgconf/uitron.h</TT>,and can be set using the configuration tool or editing the<TTCLASS="FILENAME">.ecc</TT>file in your build directory by hand. </P><P>An important configuration option for the &micro;ITRONcompatibility layer is &#8220;Option: Return Error Codes for Bad Params&#8221;(<TTCLASS="LITERAL">CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT>), which allows a lot of the errorchecking code in the &micro;ITRON compatibility layer tobe removed. Of course this leaves a program open to undetected errors,so it should only be used once an application is fully debugged andtested. Its benefits include reduced code size and faster execution.However, it affects the API significantly, in that with this optionenabled, bad calls do not return errors, but cause an assertfailure (if that is itself enabled) or malfunction internally. Thereis discussion in more detail about this in each section below.</P><P>We now give a brief description of the &micro;ITRONfunctions which are implemented in this release. Note that all Cand C&#0043;&#0043; source files should have the following <TTCLASS="LITERAL">#include</TT> statement: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">#include &lt;cyg/compat/uitron/uit_func.h&gt;</PRE></TD></TR></TABLE></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="compat-uitron-microitron-api.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="compat-uitron-task-management-functions.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">&micro;ITRON API</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="compat-uitron-microitron-api.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Task Management Functions</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -