diff packages/infra/current/cdl/assert.cdl @ 76:435cced73e2f ecos-v1_3_1-release

eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
author jlarmour
date Tue, 28 Mar 2000 14:10:45 +0000
parents
children e0c0827131d1
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/packages/infra/current/cdl/assert.cdl
@@ -0,0 +1,109 @@
+# ====================================================================
+#
+#      assert.cdl
+#
+#      Infrastructure debugging/assertion configuration data
+#
+# ====================================================================
+#####COPYRIGHTBEGIN####
+#                                                                          
+# -------------------------------------------                              
+# The contents of this file are subject to the Red Hat eCos Public License 
+# Version 1.1 (the "License"); you may not use this file except in         
+# compliance with the License.  You may obtain a copy of the License at    
+# http://www.redhat.com/                                                   
+#                                                                          
+# 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 Configurable Operating System,      
+# released September 30, 1998.                                             
+#                                                                          
+# The Initial Developer of the Original Code is Red Hat.                   
+# Portions created by Red Hat are                                          
+# Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+# All Rights Reserved.                                                     
+# -------------------------------------------                              
+#                                                                          
+#####COPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      jskov
+# Original data:  bartv,hmt
+# Contributors:
+# Date:           1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+# 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.
+
+cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {
+    display       "Preconditions"
+    default_value 1
+    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"
+    default_value 1
+    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"
+    default_value 1
+    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)."
+}
+
+cdl_option CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE {
+    display       "Use assert text"
+    default_value 1
+    description   "
+        All assertions within eCos contain a text message
+        which should give some information about the condition
+        being tested.
+        These text messages will end up being embedded in the
+        application image and hence there is a significant penalty
+        in terms of image size.
+        It is possible to suppress the use of these messages by
+        disabling this option.
+        This results in smaller code size, but there is less
+        human-readable information if an assertion actually gets
+        triggered."
+}