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

📄 infra.h

📁 ecos为实时嵌入式操作系统
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifndef CYGONCE_PKGCONF_INFRA_H#define CYGONCE_PKGCONF_INFRA_H//=========================================================================//                                                                         //      pkgconf/infra.h                                                    //                                                                         //      Infrastructure configuration file.                                 //                                                                         //=========================================================================//####COPYRIGHTBEGIN####//// -------------------------------------------// The contents of this file are subject to the Cygnus eCos Public License// Version 1.0 (the "License"); you may not use this file except in// compliance with the License.  You may obtain a copy of the License at// http://sourceware.cygnus.com/ecos// // Software distributed under the License is distributed on an "AS IS"// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the// License for the specific language governing rights and limitations under// the License.// // The Original Code is eCos - Embedded Cygnus Operating System, released// September 30, 1998.// // The Initial Developer of the Original Code is Cygnus.  Portions created// by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions.  All Rights Reserved.// -------------------------------------------////####COPYRIGHTEND####//=========================================================================//#####DESCRIPTIONBEGIN####                                                //                                                                         // Author(s):   bartv,hmt                                                  // Contributors:        bartv,hmt                                                  // Date:        1998-04-17                                                 // Purpose:                                                                // Description:                                                            // Usage:                                                                  //                                                                         //####DESCRIPTIONEND####                                                   //=========================================================================/* The header pkgconf/system.h contains configuration options controlled by * the pkgconf tool. These options cannot be edited by hand, they can only * be changed by running pkgconf again. */#include <pkgconf/system.h>/* ====================================================================  * Debug facilities. The eCos source code contains a significant amount * of internal debugging support, in the form of assertions and * tracing. Tracing takes the form of text messages that get output * via the diagnostics channel to the host whenever an event occurs, * or whenever a function is called or returns (the implementation * may change in future releases of the system). It is possible to * enable assertions and tracing independently. There are also * options controlling the exact behaviour of the assertion and * tracing facilities, thus giving users finer control over the * code and data size requirements. * * Thought: Can we get a real 'mu' out of this in uITRON throughout? * It's \265 in C strings, in iso_8859_1 * It is mentioned in the startup enabling stuff. * *//* {{CFG_DATA   cdl_package CYGPKG_INFRA {       display "Infrastructure"       type    dummy       description "Common types and useful macros.                Tracing and assertion facilities.                Package startup options."        doc ref/ecos-ref/p-cygpkg-infra.html   }   }}CFG_DATA *//* ======================================================================== * The common types part of the system is not yet configurable. *//* {{not-CFG_DATA   cdl_component CYGPKG_INFRA_TYPES {       display          "Common Types"       type             dummy       parent           CYGPKG_INFRA       description "These types are used throughout the eCos source code.                Currently there are no configuration options associated                with the Common Types component; they are automatically                set up according to the selected HAL."   }   }}not-CFG_DATA *//* ================================================================= * This option decides whether the diag_printf() function uses * variadic argument support, or uses a K&R style declaration to * support it. It is possible that variadic arguments do not work, * or support for them is not available in a particular tool chain; * hence the option for using an alternative implementation. *//* {{CFG_DATA   cdl_option CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG {       display          "Use varargs in diag_printf()"       type             boolean       parent           CYGPKG_INFRA       description "The diagnostic routine diag_printf() can be defined                    using either variadic arguments or a K&R style definition.                    The former will work in most circumstances, but if variable                    argument handling is broken or missing then the K&R variant                    may be used. This will also generate warnings about the                    declaration of diag_printf() not being a prototype.                    These may safely be ignored."   }   }}CFG_DATA */#define CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG/* ======================================================================== * There is a global option that affects whether the user is building * a release system or a debug system.  It enables all the stuff below. * * This used to be CYG_RELEASE_DEBUG. *//* {{CFG_DATA   cdl_component CYGPKG_INFRA_DEBUG {       display          "Asserts & Tracing"       type             boolean       parent           CYGPKG_INFRA       description "The eCos source code contains a significant amount of                internal debugging support, in the form of assertions and                tracing.                Assertions check at runtime that various conditions are as                expected; if not, execution is halted.                Tracing takes the form of text messages that are output                whenever certain events occur, or whenever functions are                called or return.                The most important property of these checks and messages is                that they are not required for the program to run.                It is prudent to develop software with assertions enabled,                but disable them when making a product release, thus                removing the overhead of that checking.                It is possible to enable assertions and tracing                independently.                There are also options controlling the exact behaviour of                the assertion and tracing facilities, thus giving users                finer control over the code and data size requirements."   }   }}CFG_DATA */#undef CYGPKG_INFRA_DEBUG/* * If global debugging is enabled then by default all assertions * are enabled. Tracing is not enabled by default because it * involves excessive overheads, for example on some targets * it requires sending a string down a serial line for every * function call. Both assertions and tracing are controlled * by the following lines. *//* {{CFG_DATA   cdl_component CYGDBG_USE_ASSERTS {       display          "Use asserts"       type             boolean       parent           CYGPKG_INFRA_DEBUG       description "If this option is defined, asserts in the code                are tested.                Assert functions (CYG_ASSERT()) are defined in                'include/cyg/infra/cyg_ass.h' within the 'install' tree.                If it is not defined, these result in no additional                object code and no checking of the asserted conditions."   }   cdl_component CYGDBG_USE_TRACING {       display          "Use tracing"       type             boolean       parent           CYGPKG_INFRA_DEBUG       description "If this option is defined, tracing operations                result in output or logging, depending on other options.                This may have adverse effects on performance, if the time                taken to output message overwhelms the available CPU                power or output bandwidth.                Trace functions (CYG_TRACE())are defined in                'include/cyg/infra/cyg_trac.h' within the 'install' tree.                If it is not defined, these result in no additional                object code and no trace information."   }   }}CFG_DATA */#ifdef CYGPKG_INFRA_DEBUG# define CYGDBG_USE_ASSERTS# undef  CYGDBG_USE_TRACING#endif/* * The eCos system uses a number of more specialised assertions in * addition to a conventional ASSERT() macro. By default these are all * enabled when general assertions are enabled, but it is possible to * suppress some of them and thus reduce the size of the generated code. * * Preconditions check that a condition holds true at the beginning of * a piece of code, typically at the start of a function. For example a * kernel function might have a precondition that it is only invoked * when the scheduler is locked. * * Postconditions check that a condition holds at the end of a piece of * code, typically at the point where a function returns. For example * at the end of scheduler initialisation there could be a * postcondition that there is at least one runnable thread, the idle * thread. * * Loop invariants check that a condition holds on every iteration of * a loop. For example the deferred service support code in the kernel * could have a loop invariant that interrupts are enabled whenever * there are still DSR's pending. *//* {{CFG_DATA   cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {       display          "Preconditions"       type             boolean       parent           CYGDBG_USE_ASSERTS       description "This option allows individual control of preconditions.                A precondition is one type of assert, which it is                useful to control separately from more general asserts.                The function is CYG_PRECONDITION(condition,msg)."   }   cdl_option CYGDBG_INFRA_DEBUG_POSTCONDITIONS {       display          "Postconditions"       type             boolean       parent           CYGDBG_USE_ASSERTS       description "This option allows individual control of postconditions.                A postcondition is one type of assert, which it is                useful to control separately from more general asserts.                The function is CYG_POSTCONDITION(condition,msg)."   }   cdl_option CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS {       display          "Loop invariants"       type             boolean       parent           CYGDBG_USE_ASSERTS       description "This option allows individual control of loop invariants.                A loop invariant is one type of assert, which it is                useful to control separately from more general asserts,                particularly since a loop invariant is typically evaluated                a great many times when used correctly.                The function is CYG_LOOP_INVARIANT(condition,msg)."   }   }}CFG_DATA */#ifdef CYGDBG_USE_ASSERTS# define CYGDBG_INFRA_DEBUG_PRECONDITIONS# define CYGDBG_INFRA_DEBUG_POSTCONDITIONS# define CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS#endif/* * The eCos system uses two types of tracing mechanisms. The most common * type traces events, for example an event could be logged whenever * an interrupt occurs or whenever a context switch takes place. The * second type of tracing mechanism records every function entry and * exit. It is possible to disable this second type of tracing while * leaving the main tracing facility enabled. *//* {{CFG_DATA   cdl_option CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS {       display          "Trace function reports"       type             boolean       parent           CYGDBG_USE_TRACING       description "This option allows individual control of                function entry/exit tracing, independent of                more general tracing output.                This may be useful to remove clutter from a                trace log."   }   }}CFG_DATA */#ifdef CYGDBG_USE_TRACING# define CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS#endif/* * There are currently three tracing and assert destinations. The NULL * destination simply throws all tracing messages away. The SIMPLE * destination uses the kernel diagnostic output routines to print test * messages on the diagnostic device.  The FANCY destination does a more * elaborate job of it.  Define exactly one of these. *//* {{CFG_DATA   cdl_option CYGDBG_INFRA_DEBUG_TRACE_ASSERT_NULL {       display          "Null output"       type             radio       parent           CYGPKG_INFRA_DEBUG       description "A null output module which is useful when                debugging interactively; the output routines                can be breakpointed rather than have them actually                'print' something."   }   cdl_option CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE {       display          "Simple output"       type             radio       parent           CYGPKG_INFRA_DEBUG       description "An output module which produces simple output                from tracing and assertion events."   }

⌨️ 快捷键说明

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