comparison 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
comparison
equal deleted inserted replaced
75:41bf073c0c32 76:435cced73e2f
1 # ====================================================================
2 #
3 # assert.cdl
4 #
5 # Infrastructure debugging/assertion configuration data
6 #
7 # ====================================================================
8 #####COPYRIGHTBEGIN####
9 #
10 # -------------------------------------------
11 # The contents of this file are subject to the Red Hat eCos Public License
12 # Version 1.1 (the "License"); you may not use this file except in
13 # compliance with the License. You may obtain a copy of the License at
14 # http://www.redhat.com/
15 #
16 # Software distributed under the License is distributed on an "AS IS"
17 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 # License for the specific language governing rights and limitations under
19 # the License.
20 #
21 # The Original Code is eCos - Embedded Configurable Operating System,
22 # released September 30, 1998.
23 #
24 # The Initial Developer of the Original Code is Red Hat.
25 # Portions created by Red Hat are
26 # Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
27 # All Rights Reserved.
28 # -------------------------------------------
29 #
30 #####COPYRIGHTEND####
31 # ====================================================================
32 ######DESCRIPTIONBEGIN####
33 #
34 # Author(s): jskov
35 # Original data: bartv,hmt
36 # Contributors:
37 # Date: 1999-07-02
38 #
39 #####DESCRIPTIONEND####
40 #
41 # ====================================================================
42
43 # The eCos system uses a number of more specialised assertions in
44 # addition to a conventional ASSERT() macro. By default these are all
45 # enabled when general assertions are enabled, but it is possible to
46 # suppress some of them and thus reduce the size of the generated code.
47 #
48 # Preconditions check that a condition holds true at the beginning of
49 # a piece of code, typically at the start of a function. For example a
50 # kernel function might have a precondition that it is only invoked
51 # when the scheduler is locked.
52 #
53 # Postconditions check that a condition holds at the end of a piece of
54 # code, typically at the point where a function returns. For example
55 # at the end of scheduler initialisation there could be a
56 # postcondition that there is at least one runnable thread, the idle
57 # thread.
58 #
59 # Loop invariants check that a condition holds on every iteration of
60 # a loop. For example the deferred service support code in the kernel
61 # could have a loop invariant that interrupts are enabled whenever
62 # there are still DSR's pending.
63
64 cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {
65 display "Preconditions"
66 default_value 1
67 description "
68 This option allows individual control of preconditions.
69 A precondition is one type of assert, which it is
70 useful to control separately from more general asserts.
71 The function is CYG_PRECONDITION(condition,msg)."
72 }
73 cdl_option CYGDBG_INFRA_DEBUG_POSTCONDITIONS {
74 display "Postconditions"
75 default_value 1
76 description "
77 This option allows individual control of postconditions.
78 A postcondition is one type of assert, which it is
79 useful to control separately from more general asserts.
80 The function is CYG_POSTCONDITION(condition,msg)."
81 }
82 cdl_option CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS {
83 display "Loop invariants"
84 default_value 1
85 description "
86 This option allows individual control of loop invariants.
87 A loop invariant is one type of assert, which it is
88 useful to control separately from more general asserts,
89 particularly since a loop invariant is typically evaluated
90 a great many times when used correctly.
91 The function is CYG_LOOP_INVARIANT(condition,msg)."
92 }
93
94 cdl_option CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE {
95 display "Use assert text"
96 default_value 1
97 description "
98 All assertions within eCos contain a text message
99 which should give some information about the condition
100 being tested.
101 These text messages will end up being embedded in the
102 application image and hence there is a significant penalty
103 in terms of image size.
104 It is possible to suppress the use of these messages by
105 disabling this option.
106 This results in smaller code size, but there is less
107 human-readable information if an assertion actually gets
108 triggered."
109 }