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

📄 ref.requires.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>requires</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="The eCos Component Writer's Guide"HREF="cdl-guide.html"><LINKREL="UP"TITLE="CDL Language Specification"HREF="reference.html"><LINKREL="PREVIOUS"TITLE="parent"HREF="ref.parent.html"><LINKREL="NEXT"TITLE="script"HREF="ref.script.html"></HEAD><BODYCLASS="REFENTRY"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">The <SPANCLASS="APPLICATION">eCos</SPAN> Component Writer's Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="ref.parent.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ref.script.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="REF.REQUIRES"><SPANCLASS="PROPERTY">requires</SPAN></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN4921"></A><H2>Name</H2>Property <SPANCLASS="PROPERTY">requires</SPAN>&nbsp;--&nbsp;List constraints that the configuration should satisfy ifa given option is active and enabled..</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN4925"><H2>Synopsis</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SYNOPSIS">cdl_option &lt;name&gt; {    requires &lt;goal expression&gt;    &#8230;}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4927"></A><H2>Description</H2><P>Configuration options are not independent. For example the C librarycan provide thread-safe implementations of certain functions, but onlyif the kernel is present, if the kernel provides multi-threading, andif the kernel options related to per-thread data are enabled. It ispossible to express such constraints using <SPANCLASS="PROPERTY">requires</SPAN> properties.</P><P>The arguments to a <SPANCLASS="PROPERTY">requires</SPAN> property should constitute a goalexpression, as described in <AHREF="language.values.html#LANGUAGE.LIST-EXPRESSION">the Section called <I>List Expressions</I> in Chapter 3</A>.Most goal expressions are relatively simple because the constraintsbeing described are simple, but complicated expressions can be usedwhen necessary. The body of an option or other CDL entity can containany number of <SPANCLASS="PROPERTY">requires</SPAN> constraints. If the option is active andenabled then all these constraints should be satisfied, and any goalexpressions which evaluate to <TTCLASS="LITERAL">0</TT> will result inconflicts being raised. It is possible for users to ignore suchconflicts and attempt to build the current configuration anyway, butthere is no guarantee that anything will work. If an option isinactive or disabled then its <SPANCLASS="PROPERTY">requires</SPAN> constraints will be ignored. </P><P>The configuration system contains an inference engine which canresolve many types of conflicts automatically. For example, if option<TTCLASS="LITERAL">A</TT> is enabled and requires an option<TTCLASS="LITERAL">B</TT> that is currently disabled then the inferenceengine may attempt to resolve the conflict by enabling<TTCLASS="LITERAL">B</TT>. However this will not always be possible, forexample there may be other constraints in the configuration whichforce <TTCLASS="LITERAL">B</TT> to be disabled at present, in which caseuser intervention is required.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4942"></A><H2>Example</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_component CYGPKG_IO_SERIAL_POWERPC_COGENT_SERIAL_A {    display       "Cogent PowerPC serial port A driver"    flavor        bool    default_value 0    requires      (CYGIMP_KERNEL_INTERRUPTS_CHAIN || \                   !CYGPKG_IO_SERIAL_POWERPC_COGENT_SERIAL_B)    &#8230;}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4945"></A><H2>See Also</H2><P>Property <AHREF="ref.active-if.html"><SPANCLASS="PROPERTY">active_if</SPAN></A>.</P></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="ref.parent.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="cdl-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="ref.script.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><SPANCLASS="PROPERTY">parent</SPAN></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="reference.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><SPANCLASS="PROPERTY">script</SPAN></TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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