OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [kernel/] [v2_0/] [cdl/] [thread.cdl] - Blame information for rev 262

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      thread.cdl
4
#
5
#      configuration data related to the kernel threads
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):      jskov
44
# Original data:  nickg
45
# Contributors:
46
# Date:           1999-07-05
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
 
52
cdl_option CYGFUN_KERNEL_THREADS_TIMER {
53
    display       "Allow per-thread timers"
54
    requires      CYGVAR_KERNEL_COUNTERS_CLOCK
55
    default_value 1
56
    description   "
57
        This option controls whether or not the kernel should support
58
        per-thread clock and alarm related functions. Also some of
59
        the synchronization primitives such as semaphore and
60
        condition variable timed wait operations require per-thread
61
        timer support. If none of these facilities are required then
62
        the option can be disabled."
63
}
64
 
65
cdl_option CYGVAR_KERNEL_THREADS_NAME {
66
    display       "Support optional name for each thread"
67
    default_value 1
68
    description   "
69
        Threads may optionally be supplied with a name string that is
70
        used to identify them during debugging. This name is only
71
        present if `this option is defined. Disabling it reduces both
72
        code and data size."
73
}
74
 
75
cdl_option CYGVAR_KERNEL_THREADS_LIST {
76
    display       "Keep track of all threads using a linked list"
77
    default_value 1
78
    description   "
79
        Threads may optionally be placed on a housekeeping list so
80
        that all threads may be located easily. This is useful mainly
81
        in conjunction with source-level debugging."
82
}
83
 
84
cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT {
85
    display       "Keep track of the base of each thread's stack"
86
    default_value 1
87
    description   "
88
        This option makes the kernel keep track of the lower limit on
89
        each thread's stack. It allows the kernel to adjust the lower
90
        limit, thus making space for per-thread data. Note that it
91
        does not imply any form of run-time stack overflow checking."
92
}
93
 
94
cdl_component CYGFUN_KERNEL_THREADS_STACK_CHECKING {
95
    display       "Check thread stacks for overflows"
96
    active_if     CYGPKG_INFRA_DEBUG
97
    active_if     CYGDBG_USE_ASSERTS
98
    default_value 1
99
    description   "
100
        This option enables a variety of checks for stack overflow
101
        including signatures at the top and base of thread stacks,
102
        which are asserted for correctness whenever a thread switches."
103
 
104
    cdl_option CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING {
105
        display   "Check all threads whenever possible"
106
        requires  CYGVAR_KERNEL_THREADS_LIST
107
        default_value 0
108
        description "
109
        This option enables more active checking of all threads for
110
        wrongdoing.  In theory, checking threads other than the old and new
111
        executing threads in a thread-switch is pointless, because no other
112
        thread has run, so no other stack can be exceeded.  But errors such
113
        as memory scribbling, dangling pointers, overlapping use of store
114
        or errors accessing objects adjacent to a stack which can be very
115
        hard to find can be detected this way, saving debug time."
116
    }
117
 
118
    cdl_option CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE {
119
        display   "Signature size in bytes, at stack top and bottom"
120
        flavor data
121
        default_value 32
122
        legal_values 8 to 512
123
        description "
124
        This is the size of the area reserved for a signature at the top
125
        and bottom of all stacks.  It also provides a buffer zone for
126
        detecting overflow before external objects are corrupted, hence the
127
        ability to vary it here.  But if you are short of stack, increasing
128
        this value will make the overflow more, not less likely, of course."
129
    }
130
}
131
 
132
cdl_component CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT {
133
    display            "Measure stack usage"
134
    default_value      { 0 != CYGPKG_INFRA_DEBUG }
135
    description "
136
        This option allows measurement of each thread's stack by initializing
137
        it to a predefined value at thread creation time. Later use of the
138
        cyg_thread_measure_stack_usage() function allows the maximum stack
139
        usage of the thread so far to be obtained. Note that this is not
140
        necessarily the true maximum stack usage that the thread will ever
141
        use since all that has been measured is the stack usage corresponding
142
        to the code path followed this time, and not the code path that may
143
        be followed in future."
144
 
145
    cdl_option CYGDBG_KERNEL_THREADS_STACK_MEASUREMENT_VERBOSE_EXIT {
146
        display        "Output stack usage on thread exit"
147
        default_value  0
148
        description    "
149
            This will output the measured stack usage on the diagnostic
150
            output when a thread exits."
151
    }
152
}
153
 
154
cdl_component CYGVAR_KERNEL_THREADS_DATA {
155
    display            "Support for per-thread data"
156
    requires           CYGFUN_KERNEL_THREADS_STACK_LIMIT
157
    doc                ref/kernel-thread-data.html
158
    default_value      1
159
    description "
160
        It is possible for the kernel to support per-thread data, in
161
        other words an area of memory specific to each thread which
162
        can be used to store data for that thread. This per-thread
163
        data can be used by applications or by other packages such as
164
        the ISO C library."
165
 
166
    cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX {
167
        display            "Number of words of per-thread data"
168
        flavor             data
169
        legal_values       4 to 32
170
        default_value      6
171
        description "
172
        It is possible for the kernel to support per-thread data, in
173
        other words an area of memory specific to each thread which
174
        can be used to store data for that thread. This per-thread
175
        data can be used by applications or by other packages such as
176
        the ISO C library. This configuration option controls the
177
        number of words of per-thread data that the kernel will
178
        allow. In the current implementation a bitmask is used to identify
179
        used per-thread data slots and so the maximum legal value must
180
        remain 32."
181
    }
182
 
183
    cdl_component CYGNUM_KERNEL_THREADS_DATA_ALL {
184
        display       "Bitmap of preallocated slots of thread data"
185
        flavor        data
186
        calculated    15
187
        description   "
188
        Per thread data options. Per thread data support is based loosely
189
        on that defined by POSIX. Each thread has an array of slots, up to
190
        CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the
191
        slots have been preallocated to specific packages. Others may be
192
        allocated dynamically."
193
 
194
        cdl_option CYGNUM_KERNEL_THREADS_DATA_KERNEL {
195
            display       "Slot 0 preallocated for the kernel"
196
            flavor        data
197
            calculated    0
198
            description "
199
                This option defines the index of a per-thread data
200
                slot which is reserved by
201
                the eCos kernel
202
                for private use."
203
        }
204
        cdl_option CYGNUM_KERNEL_THREADS_DATA_ITRON {
205
            display       "Slot 1 preallocated for uITRON"
206
            flavor        data
207
            calculated    1
208
            description "
209
                This option defines the index of a per-thread data
210
                slot which is reserved by
211
                the uITRON compatibility layer
212
                for private use."
213
        }
214
        cdl_option CYGNUM_KERNEL_THREADS_DATA_ERRNO {
215
            display       "Slot 2 preallocated for errno"
216
            flavor        data
217
            calculated    2
218
            description "
219
                This option defines the index of a per-thread data
220
                slot which is reserved for use by an errno variable."
221
        }
222
        cdl_option CYGNUM_KERNEL_THREADS_DATA_POSIX {
223
            display       "Slot 3 preallocated for POSIX"
224
            flavor        data
225
            calculated    3
226
            description "
227
                This option defines the index of a per-thread data
228
                slot which is reserved by
229
                POSIX
230
                for private use."
231
        }
232
    }
233
}
234
 
235
cdl_component CYGPKG_KERNEL_THREADS_DESTRUCTORS {
236
    display       "Thread destructors"
237
    doc           ref/kernel-thread-destructors.html
238
    default_value 0
239
    description   "
240
        This option enables support for registered destructor functions to
241
        be called on thread exit."
242
 
243
 
244
    cdl_option CYGNUM_KERNEL_THREADS_DESTRUCTORS {
245
        display        "Number of possible destructors"
246
        flavor         data
247
        legal_values   1 to 65535
248
        default_value  8
249
        description    "
250
                This option gives the number of possible destructors allowed.
251
                Increasing this will increase the size of every
252
                thread control structure if per-thread destructors are
253
                enabled."
254
    }
255
 
256
    cdl_option CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD {
257
        display        "Per-thread destructors"
258
        default_value  1
259
        description    "
260
                Enabling this option makes the thread destructors a per-thread
261
                property, with each thread having its own list of destructors.
262
                Disabling this option makes the thread destructor list
263
                global so all threads have the same destructors."
264
    }
265
 
266
}
267
 
268
cdl_option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE {
269
    display       "Stack size for the idle thread"
270
    flavor        data
271
    legal_values  512 to 65536
272
    default_value 2048
273
    description   "
274
        This configuration option specifies the stack size in bytes
275
        for the idle thread. Unless the HAL is configured to use a
276
        separate interrupt stack this size must be sufficient to meet
277
        the requirements of all interrupt handlers - these
278
        requirements are cumulative if nested interrupted are
279
        enabled. Depending on the target architecture, the stack size
280
        typically has to be a multiple of eight or sixteen bytes.
281
        This will be overridden where it is used if the
282
        architectural HAL requires a minimum stack size
283
        to handle interrupts correctly."
284
}
285
 
286
# ---------------------------------------------------------------------
287
# Thread-related miscellania.
288
 
289
cdl_option CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT {
290
    display       "Maximal suspend count"
291
    flavor        data
292
    default_value 500
293
    description   "
294
        This option provides for an assertion that the count value for
295
        counted thread suspends do not exceed set limits.  This is to help
296
        with debugging, to allow a runaway loop, for example, to be
297
        detected more easily.
298
 
299
        If the option is not defined, no assert is included.  Whether asserts
300
        are themselves included depends on infrastructure configury in
301
        infra.h"
302
}
303
 
304
cdl_option CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT {
305
    display       "Maximal wake count"
306
    flavor        data
307
    default_value 500
308
    description   "
309
        This option provides for an assertion that the count value for
310
        counted thread wakeups do not exceed set limits.  This is to
311
        help with debugging, to allow a runaaway loop, for example, to
312
        be detected more easily.
313
 
314
        If the option is not defined, no assert is included.  Whether asserts
315
        are themselves included depends on infrastructure configury in
316
        infra.h"
317
}
318
 
319
 
320
#if CYGNUM_KERNEL_SCHED_PRIORITIES == 1
321
#  define CYGIMP_IDLE_THREAD_YIELD
322
#endif
323
cdl_option CYGIMP_IDLE_THREAD_YIELD {
324
    display       "Idle thread must always yield"
325
    calculated    1
326
    active_if     (CYGNUM_KERNEL_SCHED_PRIORITIES == 1)
327
    description   "
328
        If the scheduler configuration only has a single priority
329
        level, then the idle thread must yield each time around its loop."
330
}
331
 
332
# EOF thread.cdl

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.