1 |
27 |
unneback |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# signals.cdl
|
4 |
|
|
#
|
5 |
|
|
# C library signal related configuration data
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
#####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later version.
|
16 |
|
|
##
|
17 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
18 |
|
|
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
19 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
20 |
|
|
## for more details.
|
21 |
|
|
##
|
22 |
|
|
## You should have received a copy of the GNU General Public License along
|
23 |
|
|
## with eCos; if not, write to the Free Software Foundation, Inc.,
|
24 |
|
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
25 |
|
|
##
|
26 |
|
|
## As a special exception, if other files instantiate templates or use macros
|
27 |
|
|
## or inline functions from this file, or you compile this file and link it
|
28 |
|
|
## with other works to produce a work based on this file, this file does not
|
29 |
|
|
## by itself cause the resulting work to be covered by the GNU General Public
|
30 |
|
|
## License. However the source code for this file must still be made available
|
31 |
|
|
## in accordance with section (3) of the GNU General Public License.
|
32 |
|
|
##
|
33 |
|
|
## This exception does not invalidate any other reasons why a work based on
|
34 |
|
|
## this file might be covered by the GNU General Public License.
|
35 |
|
|
##
|
36 |
|
|
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
37 |
|
|
## at http://sources.redhat.com/ecos/ecos-license/
|
38 |
|
|
## -------------------------------------------
|
39 |
|
|
#####ECOSGPLCOPYRIGHTEND####
|
40 |
|
|
# ====================================================================
|
41 |
|
|
######DESCRIPTIONBEGIN####
|
42 |
|
|
#
|
43 |
|
|
# Author(s): jlarmour
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 2000-04-14
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_package CYGPKG_LIBC_SIGNALS {
|
52 |
|
|
display "ISO C library signal functions"
|
53 |
|
|
description "
|
54 |
|
|
This component controls signal functionality,
|
55 |
|
|
as implemented in ISO/IEC 9899:1990 chapter 7.7 with
|
56 |
|
|
the signal() and raise() functions. As well as
|
57 |
|
|
allowing a program to send itself signals, it is
|
58 |
|
|
also possible to cause hardware exceptions to
|
59 |
|
|
be signalled to the program in a similar way."
|
60 |
|
|
doc ref/libc.html
|
61 |
|
|
include_dir cyg/libc/signals
|
62 |
|
|
parent CYGPKG_LIBC
|
63 |
|
|
implements CYGINT_ISO_SIGNAL_NUMBERS
|
64 |
|
|
implements CYGINT_ISO_SIGNAL_IMPL
|
65 |
|
|
requires { CYGBLD_ISO_SIGNAL_NUMBERS_HEADER == \
|
66 |
|
|
"" }
|
67 |
|
|
requires { CYGBLD_ISO_SIGNAL_IMPL_HEADER == \
|
68 |
|
|
"" }
|
69 |
|
|
requires CYGPKG_ISOINFRA
|
70 |
|
|
compile raise.cxx siginit.cxx signal.cxx
|
71 |
|
|
|
72 |
|
|
# ====================================================================
|
73 |
|
|
|
74 |
|
|
cdl_option CYGSEM_LIBC_SIGNALS_THREAD_SAFE {
|
75 |
|
|
display "Thread safe signals"
|
76 |
|
|
requires CYGPKG_KERNEL
|
77 |
|
|
default_value 1
|
78 |
|
|
description "
|
79 |
|
|
Because signal handlers are global, and not
|
80 |
|
|
thread-specific (as mandated by POSIX 1003.1)
|
81 |
|
|
it is possible for multiple threads to clash
|
82 |
|
|
and corrupt data if setting the same signal
|
83 |
|
|
handler at the same time. With this option
|
84 |
|
|
enabled, a kernel mutex will be used to protect
|
85 |
|
|
the shared data."
|
86 |
|
|
}
|
87 |
|
|
|
88 |
|
|
cdl_component CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS {
|
89 |
|
|
display "Hardware exceptions cause signals"
|
90 |
|
|
flavor bool
|
91 |
|
|
requires CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
|
92 |
|
|
requires CYGSEM_KERNEL_EXCEPTIONS_DECODE
|
93 |
|
|
default_value 0
|
94 |
|
|
description "
|
95 |
|
|
This causes hardware exceptions like
|
96 |
|
|
arithmetic exceptions (e.g. divide by zero)
|
97 |
|
|
or bad memory accesses to be passed through as
|
98 |
|
|
signals. It is thus possible for a program to
|
99 |
|
|
handle these exceptions in a generic way using
|
100 |
|
|
the appropriate signal handlers. The details of
|
101 |
|
|
exactly which exceptions are passed through
|
102 |
|
|
under what circumstances depend on the
|
103 |
|
|
underlying HAL implementation. Consequently it
|
104 |
|
|
must be remembered that signal handlers cannot
|
105 |
|
|
be guaranteed to be invoked in the expected
|
106 |
|
|
circumstances if you do not know about the
|
107 |
|
|
underlying HAL implementation - it is possible
|
108 |
|
|
that the architecture is unable to detect that
|
109 |
|
|
exception."
|
110 |
|
|
|
111 |
|
|
cdl_option CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS {
|
112 |
|
|
display "Chain old exception handlers"
|
113 |
|
|
default_value 1
|
114 |
|
|
description "
|
115 |
|
|
When hardware exceptions are generated, it
|
116 |
|
|
is possible to chain into the old kernel exception
|
117 |
|
|
handler before calling any registered signal
|
118 |
|
|
handler. If this is not required, disable this
|
119 |
|
|
option and only the signal handler will be
|
120 |
|
|
called when this exception occurs. Disabling
|
121 |
|
|
this option will also save some space and code
|
122 |
|
|
usage."
|
123 |
|
|
}
|
124 |
|
|
}
|
125 |
|
|
|
126 |
|
|
cdl_component CYGPKG_LIBC_SIGNALS_INLINE {
|
127 |
|
|
display "Inline versions of functions"
|
128 |
|
|
flavor none
|
129 |
|
|
description "
|
130 |
|
|
Some functions can be made inline instead of
|
131 |
|
|
being function calls. These can be set here."
|
132 |
|
|
|
133 |
|
|
cdl_option CYGIMP_LIBC_SIGNALS_RAISE_INLINE {
|
134 |
|
|
display "raise()"
|
135 |
|
|
default_value 1
|
136 |
|
|
description "
|
137 |
|
|
Enabling this option makes raise() an inline function."
|
138 |
|
|
}
|
139 |
|
|
|
140 |
|
|
cdl_option CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE {
|
141 |
|
|
display "signal()"
|
142 |
|
|
default_value 1
|
143 |
|
|
description "
|
144 |
|
|
Enabling this option makes signal() an inline function."
|
145 |
|
|
}
|
146 |
|
|
}
|
147 |
|
|
|
148 |
|
|
cdl_component CYGPKG_LIBC_SIGNALS_ERROR_HANDLING {
|
149 |
|
|
display "Error handling"
|
150 |
|
|
flavor none
|
151 |
|
|
description "
|
152 |
|
|
You may or may not want errno to be set by
|
153 |
|
|
certain functions. Not using errno could save
|
154 |
|
|
both space, code, and avoid worrying about
|
155 |
|
|
interactions between multiple threads when
|
156 |
|
|
setting it."
|
157 |
|
|
|
158 |
|
|
cdl_option CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL {
|
159 |
|
|
display "Bad signal fatal"
|
160 |
|
|
requires CYGDBG_USE_ASSERTS
|
161 |
|
|
default_value 0
|
162 |
|
|
description "
|
163 |
|
|
Enabling this option will cause an assertion
|
164 |
|
|
failure if the signal handling code is
|
165 |
|
|
passed a bad signal. Otherwise an error will
|
166 |
|
|
be returned, or in the case of a
|
167 |
|
|
hardware-generated exception it will be silently
|
168 |
|
|
ignored."
|
169 |
|
|
}
|
170 |
|
|
|
171 |
|
|
cdl_option CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO {
|
172 |
|
|
display "raise() sets errno"
|
173 |
|
|
requires CYGINT_ISO_ERRNO
|
174 |
|
|
requires CYGINT_ISO_ERRNO_CODES
|
175 |
|
|
default_value 1
|
176 |
|
|
description "
|
177 |
|
|
You may or may not want errno to be set by
|
178 |
|
|
raise() on error conditions. Not using errno
|
179 |
|
|
could save both space, code, and avoid worrying
|
180 |
|
|
about interactions between multiple threads when
|
181 |
|
|
setting it. Strictly ISO C does not mandate
|
182 |
|
|
that errno be set by raise()."
|
183 |
|
|
}
|
184 |
|
|
|
185 |
|
|
cdl_option CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO {
|
186 |
|
|
display "signal() sets errno"
|
187 |
|
|
requires CYGINT_ISO_ERRNO
|
188 |
|
|
requires CYGINT_ISO_ERRNO_CODES
|
189 |
|
|
default_value 1
|
190 |
|
|
description "
|
191 |
|
|
You may or may not want errno to be set by
|
192 |
|
|
signal() on error conditions. Not using errno
|
193 |
|
|
could save both space, code, and avoid worrying
|
194 |
|
|
about interactions between multiple threads when
|
195 |
|
|
setting it. Strictly ISO C mandates
|
196 |
|
|
that errno be set by signal()."
|
197 |
|
|
}
|
198 |
|
|
}
|
199 |
|
|
|
200 |
|
|
cdl_component CYGPKG_LIBC_SIGNALS_TRACING {
|
201 |
|
|
display "Tracing"
|
202 |
|
|
flavor none
|
203 |
|
|
description "
|
204 |
|
|
These options control the trace output for the C
|
205 |
|
|
library internal signal implementation."
|
206 |
|
|
|
207 |
|
|
cdl_option CYGNUM_LIBC_SIGNALS_RAISE_TRACE_LEVEL {
|
208 |
|
|
display "Default trace level for raise()"
|
209 |
|
|
flavor data
|
210 |
|
|
legal_values 0 to 1
|
211 |
|
|
default_value 0
|
212 |
|
|
description "
|
213 |
|
|
This gives the default tracing level for the
|
214 |
|
|
raise() function. Higher numbers are more
|
215 |
|
|
verbose."
|
216 |
|
|
}
|
217 |
|
|
|
218 |
|
|
cdl_option CYGNUM_LIBC_SIGNALS_HWHANDLER_TRACE_LEVEL {
|
219 |
|
|
display "Default hardware exception handler trace level"
|
220 |
|
|
flavor data
|
221 |
|
|
legal_values 0 to 1
|
222 |
|
|
default_value 0
|
223 |
|
|
description "
|
224 |
|
|
This gives the default tracing level for the
|
225 |
|
|
hardware exception handler function (if enabled).
|
226 |
|
|
Higher numbers are more verbose."
|
227 |
|
|
}
|
228 |
|
|
}
|
229 |
|
|
|
230 |
|
|
# ====================================================================
|
231 |
|
|
|
232 |
|
|
cdl_component CYGPKG_LIBC_SIGNALS_OPTIONS {
|
233 |
|
|
display "C library signal functions build options"
|
234 |
|
|
flavor none
|
235 |
|
|
no_define
|
236 |
|
|
description "
|
237 |
|
|
Package specific build options including control over
|
238 |
|
|
compiler flags used only in building this package,
|
239 |
|
|
and details of which tests are built."
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
cdl_option CYGPKG_LIBC_SIGNALS_CFLAGS_ADD {
|
243 |
|
|
display "Additional compiler flags"
|
244 |
|
|
flavor data
|
245 |
|
|
no_define
|
246 |
|
|
default_value { "" }
|
247 |
|
|
description "
|
248 |
|
|
This option modifies the set of compiler flags for
|
249 |
|
|
building the C library. These flags are used in addition
|
250 |
|
|
to the set of global flags."
|
251 |
|
|
}
|
252 |
|
|
|
253 |
|
|
cdl_option CYGPKG_LIBC_SIGNALS_CFLAGS_REMOVE {
|
254 |
|
|
display "Suppressed compiler flags"
|
255 |
|
|
flavor data
|
256 |
|
|
no_define
|
257 |
|
|
default_value { "" }
|
258 |
|
|
description "
|
259 |
|
|
This option modifies the set of compiler flags for
|
260 |
|
|
building the C library. These flags are removed from
|
261 |
|
|
the set of global flags if present."
|
262 |
|
|
}
|
263 |
|
|
|
264 |
|
|
cdl_option CYGPKG_LIBC_SIGNALS_TESTS {
|
265 |
|
|
display "C library signal function tests"
|
266 |
|
|
flavor data
|
267 |
|
|
no_define
|
268 |
|
|
calculated {
|
269 |
|
|
"tests/signal1"
|
270 |
|
|
. ((CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS) ? " tests/signal2" : "")
|
271 |
|
|
}
|
272 |
|
|
description "
|
273 |
|
|
This option specifies the set of tests for the C library
|
274 |
|
|
signal functions."
|
275 |
|
|
}
|
276 |
|
|
}
|
277 |
|
|
}
|
278 |
|
|
|
279 |
|
|
# ====================================================================
|
280 |
|
|
# EOF signals.cdl
|