Mercurial > ecos-v3_0-branch
annotate packages/kernel/current/include/pkgconf/kernel.h @ 6:d376b777e2ce ecos-sw-1999-05-14
Merge from eCos master repository on 1999-05-14-19:27:43-BST
| author | jlarmour |
|---|---|
| date | Fri, 14 May 1999 12:20:00 +0000 |
| parents | 443894e2e912 |
| children | ece80412419a |
| rev | line source |
|---|---|
| 0 | 1 #ifndef CYGONCE_PKGCONF_KERNEL_H |
| 2 #define CYGONCE_PKGCONF_KERNEL_H | |
| 3 // ==================================================================== | |
| 4 // | |
| 2 | 5 // pkgconf/kernel.h |
| 0 | 6 // |
| 2 | 7 // Kernel configuration file |
| 0 | 8 // |
| 9 // ==================================================================== | |
| 10 //####COPYRIGHTBEGIN#### | |
| 11 // | |
| 12 // ------------------------------------------- | |
| 13 // The contents of this file are subject to the Cygnus eCos Public License | |
| 14 // Version 1.0 (the "License"); you may not use this file except in | |
| 15 // compliance with the License. You may obtain a copy of the License at | |
| 16 // http://sourceware.cygnus.com/ecos | |
| 17 // | |
| 18 // Software distributed under the License is distributed on an "AS IS" | |
| 19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 20 // License for the specific language governing rights and limitations under | |
| 21 // the License. | |
| 22 // | |
| 23 // The Original Code is eCos - Embedded Cygnus Operating System, released | |
| 24 // September 30, 1998. | |
| 25 // | |
| 26 // The Initial Developer of the Original Code is Cygnus. Portions created | |
| 2 | 27 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
| 0 | 28 // ------------------------------------------- |
| 29 // | |
| 30 //####COPYRIGHTEND#### | |
| 31 // ==================================================================== | |
| 32 //#####DESCRIPTIONBEGIN#### | |
| 33 // | |
| 2 | 34 // Author(s): nickg |
| 35 // Contributors: nickg | |
| 36 // Date: 1997-09-29 | |
| 37 // Purpose: To allow the user to edit kernel configuration options. | |
| 0 | 38 // Description: |
| 39 // | |
| 40 //####DESCRIPTIONEND#### | |
| 41 // | |
| 42 // ==================================================================== | |
| 43 | |
| 44 /* --------------------------------------------------------------------- | |
| 45 * Some of the kernel configuration options depend on global options, | |
| 46 * so it is necessary to include the global options first. | |
| 47 */ | |
| 48 | |
| 49 #include <pkgconf/system.h> | |
| 50 | |
| 51 /* Only define options if the kernel is to be present */ | |
| 52 #ifdef CYGPKG_KERNEL | |
| 53 | |
| 54 #include <pkgconf/hal.h> | |
| 55 #include <pkgconf/infra.h> | |
| 56 | |
| 57 /* --------------------------------------------------------------------- | |
| 58 * The overall package definition. | |
| 59 | |
| 60 {{CFG_DATA | |
| 61 | |
| 62 cdl_package CYGPKG_KERNEL { | |
| 63 display "eCos kernel" | |
| 64 type boolean | |
| 65 requires CYGFUN_HAL_COMMON_KERNEL_SUPPORT | |
| 66 description " | |
| 67 This package contains the core functionality of the eCos | |
| 68 kernel. It relies on functionality provided by various HAL | |
| 69 packages and by the eCos infrastructure. In turn the eCos | |
| 70 kernel provides support for other packages such as the device | |
| 71 drivers and the uITRON compatibility layer." | |
| 72 doc ref/ecos-ref/ecos-kernel-overview.html | |
| 73 } | |
| 74 | |
| 75 }}CFG_DATA */ | |
| 76 | |
| 77 /* --------------------------------------------------------------------- | |
| 78 * The first component within the kernel is related to interrupt | |
| 79 * handling. | |
| 80 {{CFG_DATA | |
| 81 | |
| 82 cdl_component CYGPKG_KERNEL_INTERRUPTS { | |
| 83 display "Kernel interrupt handling" | |
| 84 parent CYGPKG_KERNEL | |
| 85 type dummy | |
| 86 description " | |
| 87 The majority of configuration options related to interrupt | |
| 88 handling are in the HAL packages, since usually the code has | |
| 89 to be platform-specific. There are a number of options | |
| 90 provided within the kernel related to slightly higher-level | |
| 91 concepts, for example Delayed Service Routines." | |
| 92 doc ref/ecos-ref/interrupts.html | |
| 93 } | |
| 94 | |
| 95 # In the absence of active-if support this has to be | |
| 96 # a sub-component. It does not use the CYGPKG_ prefix to make | |
| 97 # it easier to change back into an ordinary option later on. | |
| 98 cdl_component CYGIMP_KERNEL_INTERRUPTS_DSRS { | |
| 99 display "Use delayed service routines (DSRs)" | |
| 100 parent CYGPKG_KERNEL_INTERRUPTS | |
| 101 description " | |
| 102 In eCos the recommended way to handle device interrupts is to | |
| 103 do a minimum amount of work inside the low level interrupt | |
| 104 handler itself, and instead do as much as possible in a | |
| 105 Delayed Service Routine or DSR. If an application does not | |
| 106 make use of DSRs directly or indirectly then it is possible | |
| 107 to disable the DSR support completely, which reduces the | |
| 108 overheads of context switches and interrupt handling. Note | |
| 109 that the kernel real-time clock makes use of DSRs, as do many | |
| 110 of the device drivers. " | |
| 111 doc ref/ecos-ref/interrupt-and-exception-handlers.html | |
| 112 } | |
| 113 | |
| 114 # NOTE: the choice of list vs table should not be two separate | |
| 115 # options. There is a single option which must have one of | |
| 116 # two legal values. | |
| 117 cdl_option CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST { | |
| 118 display "Use linked lists for DSRs" | |
| 119 parent CYGIMP_KERNEL_INTERRUPTS_DSRS | |
| 120 type radio | |
| 121 description " | |
| 122 When DSR support is enabled the kernel must keep track of all | |
| 123 the DSRs that are pending. This information can be kept in a | |
| 124 fixed-size table or in a linked list. The list implementation | |
| 125 requires that the kernel disable interrupts for a very short | |
| 126 period of time outside interrupt handlers, but there is no | |
| 127 possibility of a table overflow occurring." | |
| 128 doc ref/ecos-ref/interrupts.html | |
| 129 } | |
| 130 | |
| 131 cdl_option CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE { | |
| 132 display "Use fixed-size table for DSRs" | |
| 133 parent CYGIMP_KERNEL_INTERRUPTS_DSRS | |
| 134 type radio | |
| 135 description " | |
| 136 When DSR support is enabled the kernel must keep track of all | |
| 137 the DSRs that are pending. This information can be kept in a | |
| 138 fixed-size table or in a linked list. The table | |
| 139 implementation involves a very small risk of overflow at | |
| 140 run-time if a given interrupt source is able to have more | |
| 141 than one pending DSR. However it has the advantage that | |
| 142 the kernel does not need to disable interrupts outside | |
| 143 interrupt handlers." | |
| 144 doc ref/ecos-ref/interrupts.html | |
| 145 } | |
| 146 | |
| 147 cdl_option CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE { | |
| 148 display "Number of entries in fixed-size DSR table" | |
| 149 parent CYGIMP_KERNEL_INTERRUPTS_DSRS | |
| 150 type count | |
| 151 legal_values 2 to 1024 | |
| 152 #active_if CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE | |
| 153 description " | |
| 154 When DSR support is enabled the kernel must keep track of all | |
| 155 the DSRs that are pending. One approach involves a fixed-size | |
| 156 table, which involves a very small risk of overflow at | |
| 157 run-time. By increasing the table size it is possible to reduce | |
| 158 this risk." | |
| 159 doc ref/ecos-ref/interrupts.html | |
| 160 } | |
| 161 | |
| 162 cdl_option CYGIMP_KERNEL_INTERRUPTS_CHAIN { | |
| 163 display "Chain all interrupts together" | |
| 164 parent CYGPKG_KERNEL_INTERRUPTS | |
| 165 requires CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN | |
| 166 description " | |
| 167 Interrupts can be attached to vectors either singly, or be | |
| 168 chained together. The latter is necessary if there is no way | |
| 169 of discovering which device has interrupted without | |
| 170 inspecting the device itself. It can also reduce the amount | |
| 171 of RAM needed for interrupt decoding tables and code." | |
| 172 doc ref/ecos-ref/interrupts.html | |
| 173 } | |
| 174 | |
| 175 }}CFG_DATA */ | |
| 176 | |
| 177 #define CYGIMP_KERNEL_INTERRUPTS_DSRS | |
| 178 #define CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST | |
| 179 #undef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE | |
| 180 #define CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE 32 | |
| 181 #undef CYGIMP_KERNEL_INTERRUPTS_CHAIN | |
| 182 | |
| 183 /* --------------------------------------------------------------------- | |
| 184 * Exceptions. Currently there are only two options. The first | |
| 185 * determines whether or not exceptions are enabled at all. The | |
| 186 * second controls whether they apply globally or on a per-thread | |
| 187 * basis. There should probably be more options, but the boundary | |
| 188 * between the HAL and kernel becomes blurred. | |
| 189 | |
| 190 {{CFG_DATA | |
| 191 | |
| 192 cdl_component CYGPKG_KERNEL_EXCEPTIONS { | |
| 193 display "Exception handling" | |
| 194 parent CYGPKG_KERNEL | |
| 195 requires CYGPKG_HAL_EXCEPTIONS | |
| 196 description " | |
| 197 In the context of the eCos kernel exceptions are unexpected | |
| 198 events detected by the hardware, for example an attempt to | |
| 199 execute an illegal instruction. There is no relation with | |
| 200 other forms of exception, for example the catch and throw | |
| 201 facilities of languages like C++. It is possible to disable | |
| 202 all support for exceptions and thus save some memory." | |
| 203 doc ref/ecos-ref/exceptions.html | |
| 204 } | |
| 205 | |
| 206 cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE { | |
| 207 display "Decode exception types in kernel" | |
| 208 parent CYGPKG_KERNEL_EXCEPTIONS | |
| 209 description " | |
| 210 On targets where several different types of exception are | |
| 211 possible, for example executing an illegal instruction and | |
| 212 division by zero, it is possible for the kernel to do some | |
| 213 decoding of the exception type and deliver the different | |
| 214 types of exception to different handlers in the application | |
| 215 code. Alternatively the kernel can simply pass all | |
| 216 exceptions directly to application code, leaving the | |
| 217 decoding to be done by the application" | |
| 218 doc ref/ecos-ref/exceptions.html | |
| 219 } | |
| 220 | |
| 221 cdl_option CYGSEM_KERNEL_EXCEPTIONS_GLOBAL { | |
| 222 display "Use global exception handlers" | |
| 223 parent CYGPKG_KERNEL_EXCEPTIONS | |
| 224 description " | |
| 225 In the context of the eCos kernel exceptions are unexpected | |
| 226 events detected by the hardware, for example an attempt to | |
| 227 execute an illegal instruction. If the kernel is configured | |
| 228 to support exceptions then two implementations are | |
| 229 possible. The default implementation involves a single set | |
| 230 of exception handlers that are in use for the entire | |
| 231 system. The alternative implementation allows different | |
| 232 exception handlers to be specified for each thread." | |
| 233 doc ref/ecos-ref/exceptions.html | |
| 234 } | |
| 235 | |
| 236 }}CFG_DATA */ | |
| 237 | |
| 238 #define CYGPKG_KERNEL_EXCEPTIONS | |
| 239 #undef CYGSEM_KERNEL_EXCEPTIONS_DECODE | |
| 240 #define CYGSEM_KERNEL_EXCEPTIONS_GLOBAL | |
| 241 | |
| 242 | |
| 243 /* --------------------------------------------------------------------- | |
| 244 * {{CFG_DATA | |
| 245 | |
| 246 cdl_component CYGPKG_KERNEL_SCHED { | |
| 247 display "Kernel schedulers" | |
| 248 type dummy | |
| 249 parent CYGPKG_KERNEL | |
| 250 description " | |
| 251 The eCos kernel provides a choice of schedulers. In addition | |
| 252 there are a number of configuration options to control the | |
| 253 detailed behaviour of these schedulers. | |
| 254 " | |
| 255 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER | |
| 256 } | |
| 257 | |
| 258 cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE { | |
| 259 display "Multi-level queue scheduler" | |
| 260 type radio | |
| 261 parent CYGPKG_KERNEL_SCHED | |
| 262 description " | |
| 263 The multi-level queue scheduler supports multiple priority | |
| 264 levels and multiple threads at each priority level. | |
| 265 Preemption between priority levels is automatic. Timeslicing | |
| 266 within a given priority level is controlled by a separate | |
| 267 configuration option" | |
| 268 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER | |
| 269 } | |
| 270 | |
| 271 cdl_option CYGSEM_KERNEL_SCHED_BITMAP { | |
| 272 display "Bitmap scheduler" | |
| 273 type radio | |
| 274 parent CYGPKG_KERNEL_SCHED | |
| 275 description " | |
| 276 The bitmap scheduler supports multiple priority levels but | |
| 277 only one thread can exist at each priority level. This means | |
| 278 that scheduling decisions are very simple and hence the | |
| 279 scheduler is efficient. Preemption between priority levels is | |
| 280 automatic. Timeslicing within a given priority level is | |
| 281 irrelevant since there can be only one thread at each | |
| 282 priority level." | |
| 283 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER | |
| 284 } | |
| 285 | |
| 286 #cdl_option CYGSEM_KERNEL_SCHED_LOTTERY { | |
| 287 # display "Lottery scheduler" | |
| 288 # type radio | |
| 289 # parent CYGPKG_KERNEL_SCHED | |
| 290 # description " | |
| 291 # This scheduler is not yet available." | |
| 292 #} | |
| 293 | |
| 294 # NOTE: this option only makes sense if the current scheduler | |
| 295 # supports multiple priority levels. | |
| 296 cdl_option CYGNUM_KERNEL_SCHED_PRIORITIES { | |
| 297 display "Number of priority levels" | |
| 298 type count | |
| 299 legal_values 1 to 32 | |
| 300 parent CYGPKG_KERNEL_SCHED | |
| 301 #active_if CYGINT_KERNEL_SCHED_PRIORITY_SCHEDULER | |
| 302 description " | |
| 303 This option controls the number of priority levels that are | |
| 304 available. For some types of scheduler including the bitmap | |
| 305 scheduler this may impose an upper bound on the number of | |
| 306 threads in the system. For other schedulers such as the | |
| 307 mlqueue scheduler the number of threads is independent from | |
| 308 the number of priority levels. Note that the lowest priority | |
| 309 level is normally used only by the idle thread, although | |
| 310 application threads can run at this priority if necessary." | |
| 311 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER | |
| 312 } | |
| 313 | |
| 314 # NOTE: this option only makes sense for some of the schedulers. | |
| 315 # Timeslicing is irrelevant for bitmap schedulers. | |
| 316 cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE { | |
| 317 display "Scheduler timeslicing" | |
| 318 parent CYGPKG_KERNEL_SCHED | |
| 319 requires !CYGSEM_KERNEL_SCHED_BITMAP | |
| 320 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 321 description " | |
| 322 Some schedulers including the mlqueue scheduler support | |
| 323 timeslicing. This means that the kernel will check regularly | |
| 324 whether or not there is another runnable thread with the | |
| 325 same priority, and if there is such a thread there will be | |
| 326 an automatic context switch. Not all applications require | |
| 327 timeslicing, for example because every thread performs a | |
| 328 blocking operation regularly. For these applications it is | |
| 329 possible to disable timeslicing, which reduces the overheads | |
| 330 associated with timer interrupts." | |
| 331 } | |
| 332 | |
| 333 cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS { | |
| 334 display "Number of clock ticks between timeslices" | |
| 335 parent CYGPKG_KERNEL_SCHED | |
| 336 type count | |
| 337 legal_values 1 to 65535 | |
| 338 #active_if CYGSEM_KERNEL_SCHED_TIMESLICE | |
| 339 description " | |
| 340 Assuming timeslicing is enabled, how frequently should it | |
| 341 take place? The value of this option corresponds to the | |
| 342 number of clock ticks that should occur before a timeslice | |
| 343 takes place, so increasing the value reduces the frequency | |
| 344 of timeslices." | |
| 345 } | |
| 346 | |
| 347 }}CFG_DATA */ | |
| 348 | |
| 349 #define CYGSEM_KERNEL_SCHED_MLQUEUE | |
| 350 #undef CYGSEM_KERNEL_SCHED_BITMAP | |
| 351 #undef CYGSEM_KERNEL_SCHED_LOTTERY | |
| 352 #define CYGNUM_KERNEL_SCHED_PRIORITIES 32 | |
| 353 #define CYGSEM_KERNEL_SCHED_TIMESLICE | |
| 354 #define CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS 5 | |
| 355 | |
| 356 /* --------------------------------------------------------------------- | |
| 357 * Counters and clocks. | |
| 358 | |
| 359 {{CFG_DATA | |
| 360 | |
| 361 cdl_component CYGPKG_KERNEL_COUNTERS { | |
| 362 display "Counters and clocks" | |
| 363 parent CYGPKG_KERNEL | |
| 364 type dummy | |
| 365 description " | |
| 366 The counter objects provided by the kernel provide an | |
| 367 abstraction of the clock facility that is generally provided. | |
| 368 Application code can associate alarms with counters, where an | |
| 369 alarm is identified by the number of ticks until it triggers, | |
| 370 the action to be taken on triggering, and whether or not the | |
| 371 alarm should be repeated." | |
| 372 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 373 } | |
| 374 | |
| 375 cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK { | |
| 376 display "Provide real-time clock" | |
| 377 parent CYGPKG_KERNEL_COUNTERS | |
| 378 requires CYGIMP_KERNEL_INTERRUPTS_DSRS | |
| 379 description " | |
| 380 On all current target systems the kernel can provide a | |
| 381 real-time clock. This clock serves two purposes. First it is | |
| 382 necessary to support clock and alarm related functions. | |
| 383 Second it is needed to implement timeslicing in some of the | |
| 384 schedulers including the mlqueue scheduler. If the | |
| 385 application does not require any of these facilities then it | |
| 386 is possible to disable the real time clock support | |
| 387 completely." | |
| 388 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 389 } | |
| 390 | |
| 391 cdl_component CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE { | |
| 392 display "Override default clock settings" | |
| 393 parent CYGPKG_KERNEL_COUNTERS | |
| 394 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 395 type bool | |
| 396 description " | |
| 397 The kernel has default settings for the clock interrupt | |
| 398 frequency. These settings will vary from platform to | |
| 399 platform, but typically there will be a 100 clock interrupts | |
| 400 every second. It is possible to change this frequency, but | |
| 401 it requires some knowledge of the target hardware. | |
| 402 " | |
| 403 } | |
| 404 | |
| 405 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD { | |
| 406 display "Clock hardware initialization value" | |
| 407 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 408 type count | |
| 409 legal_values 1 to 0x7fffffff | |
| 410 description " | |
| 411 During system initialization this value is used to initialize | |
| 412 the clock hardware. The exact meaning of the value and the | |
| 413 range of legal values therefore depends on the target hardware, | |
| 414 and the hardware documentation should be consulted for further | |
| 415 details. In addition the clock resolution numerator and | |
| 416 denominator values should be updated. Typical values for | |
| 417 this option would be 150000 on the MN10300 stdeval1 board, | |
| 2 | 418 15625 on the tx39 jmr3904 board, and 20833 on the powerpc |
| 0 | 419 cogent board." |
| 420 } | |
| 421 | |
| 422 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR { | |
| 423 display "Clock resolution numerator" | |
| 424 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 425 type count | |
| 426 legal_values 1 to 0x7fffffff | |
| 427 description " | |
| 428 If a non-default clock interrupt frequency is used then it | |
| 429 is necessary to specify the clock resolution explicitly. | |
| 430 This resolution involves two separate values, the numerator | |
| 431 and the denominator. The result of dividing the numerator by | |
| 432 the denominator should correspond to the number of | |
| 433 nanoseconds between clock interrupts. For example a | |
| 434 numerator of 1000000000 and a denominator of 100 means that | |
| 435 there are 10000000 nanoseconds (or 10 milliseconds) between | |
| 436 clock interrupts. Expressing the resolution as a fraction | |
| 437 should minimize clock drift even for frequencies that cannot | |
| 438 be expressed as a simple integer. For example a frequency of | |
| 439 60Hz corresponds to a clock resolution of 16666666.66... | |
| 440 nanoseconds. This can be expressed accurately as 1000000000 | |
| 441 over 60." | |
| 442 } | |
| 443 | |
| 444 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR { | |
| 445 display "Clock resolution denominator" | |
| 446 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 447 type count | |
| 448 legal_values 1 to 0x7fffffff | |
| 449 description " | |
| 450 If a non-default clock interrupt frequency is used then it | |
| 451 is necessary to specify the clock resolution explicitly. | |
| 452 This resolution involves two separate values, the numerator | |
| 453 and the denominator. The result of dividing the numerator by | |
| 454 the denominator should correspond to the number of | |
| 455 nanoseconds between clock interrupts. For example a | |
| 456 numerator of 1000000000 and a denominator of 100 means that | |
| 457 there are 10000000 nanoseconds (or 10 milliseconds) between | |
| 458 clock interrupts. Expressing the resolution as a fraction | |
| 459 should minimize clock drift even for frequencies that cannot | |
| 460 be expressed as a simple integer. For example a frequency of | |
| 461 60Hz corresponds to a clock resolution of 16666666.66... | |
| 462 nanoseconds. This can be expressed accurately as 1000000000 | |
| 463 over 60." | |
| 464 } | |
| 465 | |
| 466 | |
| 467 # NOTE: these option should really be a single enum. | |
| 468 cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST { | |
| 469 display "Implement counters using a single list" | |
| 470 parent CYGPKG_KERNEL_COUNTERS | |
| 471 type radio | |
| 472 description " | |
| 473 There are two different implementations of the counter | |
| 474 objects. The first implementation stores all alarms in a | |
| 475 single linked list. The alternative implementation uses a | |
| 476 table of linked lists. A single list is more efficient in | |
| 477 terms of memory usage and is generally adequate when the | |
| 478 application only makes use of a small number of alarms." | |
| 479 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 480 } | |
| 481 | |
| 482 cdl_option CYGIMP_KERNEL_COUNTERS_MULTI_LIST { | |
| 483 display "Implement counters using a table of lists" | |
| 484 parent CYGPKG_KERNEL_COUNTERS | |
| 485 type radio | |
| 486 description " | |
| 487 There are two different implementations of the counter | |
| 488 objects. The first implementation stores all alarms in a | |
| 489 single linked list. The alternative implementation uses a | |
| 490 table of linked lists, with the size of the table being a | |
| 491 separate configurable option. For more complicated | |
| 492 operations it is better to have a table of lists since this | |
| 493 reduces the amount of computation whenever the timer goes | |
| 494 off. Assuming a table size of 8 (the default value) on | |
| 495 average the timer code will only need to check 1/8 of the | |
| 496 pending alarms instead of all of them." | |
| 497 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 498 } | |
| 499 | |
| 500 cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE { | |
| 501 display "Size of counter list table" | |
| 502 parent CYGPKG_KERNEL_COUNTERS | |
| 503 type count | |
| 504 legal_values 1 to 1024 | |
| 505 #active_if CYGIMP_KERNEL_COUNTERS_MULTI_LIST | |
| 506 description " | |
| 507 If counters are implemented using an array of linked lists | |
| 508 then this option controls the size of the array. A larger | |
| 509 size reduces the amount of computation that needs to take | |
| 510 place whenever the timer goes off, but requires extra | |
| 511 memory." | |
| 512 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 513 } | |
| 514 | |
| 2 | 515 cdl_option CYGIMP_KERNEL_COUNTERS_SORT_LIST { |
| 516 display "Sort the counter list" | |
| 517 parent CYGPKG_KERNEL_COUNTERS | |
| 518 type bool | |
| 519 description " | |
| 520 Sorting the counter lists reduces the amount of work that | |
| 521 has to be done when a counter tick is processed, since the | |
| 522 next alarm to expire is always at the front of the list. | |
| 523 However, it makes adding an alarm to the list more expensive | |
| 524 since a search must be done for the correct place to put it. | |
| 525 Many alarms are used to implement timeouts, which seldom trigger, | |
| 526 so it is worthwhile optimizing this case. For this reason | |
| 527 sorted list are disabled by default." | |
| 528 } | |
| 529 | |
| 530 cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY { | |
| 531 display "Measure real-time [clock] interrupt latency" | |
| 532 parent CYGPKG_KERNEL_COUNTERS | |
| 533 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 534 description " | |
| 535 Measure the interrupt latency as seen by the real-time clock | |
| 536 timer interrupt. This requires hardware support, defined by | |
| 537 the HAL_CLOCK_LATENCY() macro." | |
| 538 doc ref/ecos-ref/counters-clocks-and-alarms.html | |
| 539 } | |
| 540 | |
| 0 | 541 }}CFG_DATA */ |
| 542 | |
| 543 #define CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 544 #undef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 545 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD 9999 | |
| 546 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR 1000000000 | |
| 547 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR 100 | |
| 548 #define CYGIMP_KERNEL_COUNTERS_SINGLE_LIST | |
| 549 #undef CYGIMP_KERNEL_COUNTERS_MULTI_LIST | |
| 550 #define CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE 8 | |
| 2 | 551 #undef CYGIMP_KERNEL_COUNTERS_SORT_LIST |
| 552 #undef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY | |
| 0 | 553 |
| 554 /* --------------------------------------------------------------------- | |
| 555 * Thread-related options | |
| 556 {{CFG_DATA | |
| 557 | |
| 558 cdl_component CYGPKG_KERNEL_THREADS { | |
| 559 display "Thread-related options" | |
| 560 type dummy | |
| 561 parent CYGPKG_KERNEL | |
| 562 description " | |
| 563 There are a number of configuration options related to the | |
| 564 implementation of threads, for example whether or not the | |
| 565 eCos kernel supports per-thread data." | |
| 566 doc ref/ecos-ref/thread-operations.html | |
| 567 } | |
| 568 | |
| 569 cdl_option CYGFUN_KERNEL_THREADS_TIMER { | |
| 570 display "Allow per-thread timers" | |
| 571 parent CYGPKG_KERNEL_THREADS | |
| 572 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 573 description " | |
| 574 This option controls whether or not the kernel should support | |
| 575 per-thread clock and alarm related functions. Also some of | |
| 576 the synchronization primitives such as semaphore and | |
| 577 condition variable timed wait operations require per-thread | |
| 578 timer support. If none of these facilities are required then | |
| 579 the option can be disabled." | |
| 580 doc ref/ecos-ref/thread-operations.html | |
| 581 } | |
| 582 | |
| 583 cdl_option CYGVAR_KERNEL_THREADS_NAME { | |
| 584 display "Support optional name for each thread" | |
| 585 parent CYGPKG_KERNEL_THREADS | |
| 586 description " | |
| 587 Threads may optionally be supplied with a name string that is | |
| 588 used to identify them during debugging. This name is only | |
| 589 present if `this option is defined. Disabling it reduces both | |
| 590 code and data size." | |
| 591 doc ref/ecos-ref/thread-operations.html | |
| 592 } | |
| 593 | |
| 594 cdl_option CYGVAR_KERNEL_THREADS_LIST { | |
| 595 display "Keep track of all threads using a linked list" | |
| 596 parent CYGPKG_KERNEL_THREADS | |
| 597 description " | |
| 598 Threads may optionally be placed on a housekeeping list so | |
| 599 that all threads may be located easily. This is useful mainly | |
| 600 in conjunction with source-level debugging." | |
| 601 doc ref/ecos-ref/thread-operations.html | |
| 602 } | |
| 603 | |
| 604 cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT { | |
| 605 display "Keep track of the base of each thread's stack" | |
| 606 parent CYGPKG_KERNEL_THREADS | |
| 607 description " | |
| 608 This option makes the kernel keep track of the lower limit on | |
| 609 each thread's stack. It allows the kernel to adjust the lower | |
| 610 limit, thus making space for per-thread data. Note that it | |
| 611 does not imply any form of run-time stack overflow checking." | |
| 612 doc ref/ecos-ref/thread-operations.html | |
| 613 } | |
| 614 | |
| 615 cdl_option CYGVAR_KERNEL_THREADS_DATA { | |
| 616 display "Support for per-thread data" | |
| 617 parent CYGPKG_KERNEL_THREADS | |
| 618 requires CYGFUN_KERNEL_THREADS_STACK_LIMIT | |
| 619 description " | |
| 620 It is possible for the kernel to support per-thread data, in | |
| 621 other words an area of memory specific to each thread which | |
| 622 can be used to store data for that thread. This per-thread | |
| 623 data can be used by applications or by other packages such as | |
| 624 the ISO C library." | |
| 625 doc ref/ecos-ref/thread-operations.html | |
| 626 } | |
| 627 | |
| 628 cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX { | |
| 629 display "Number of words of per-thread data" | |
| 630 parent CYGPKG_KERNEL_THREADS | |
| 631 #active_if CYGVAR_KERNEL_THREADS_DATA | |
| 632 type count | |
| 633 legal_values 1 to 65535 | |
| 634 description " | |
| 635 It is possible for the kernel to support per-thread data, in | |
| 636 other words an area of memory specific to each thread which | |
| 637 can be used to store data for that thread. This per-thread | |
| 638 data can be used by applications or by other packages such as | |
| 639 the ISO C library. This configuration option controls the | |
| 640 number of words of per-thread data that the kernel will | |
| 641 allow." | |
| 642 doc ref/ecos-ref/thread-operations.html | |
| 643 } | |
| 644 | |
| 645 cdl_option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE { | |
| 646 display "Stack size for the idle thread" | |
| 647 parent CYGPKG_KERNEL_THREADS | |
| 648 type count | |
| 649 legal_values 512 to 65536 | |
| 650 description " | |
| 651 This configuration option specifies the stack size in bytes | |
| 652 for the idle thread. Unless the HAL is configured to use a | |
| 653 separate interrupt stack this size must be sufficient to meet | |
| 654 the requirements of all interrupt handlers - these | |
| 655 requirements are cumulative if nested interrupted are | |
| 656 enabled. Depending on the target architecture, the stack size | |
| 2 | 657 typically has to be a multiple of eight or sixteen bytes. |
| 658 This will be overridden where it is used if the | |
| 659 architectural HAL requires a minimum stack size | |
| 660 to handle interrupts correctly." | |
| 661 | |
| 0 | 662 doc ref/ecos-ref/thread-operations.html |
| 663 } | |
| 664 | |
| 665 }}CFG_DATA */ | |
| 666 | |
| 667 #define CYGFUN_KERNEL_THREADS_TIMER | |
| 668 #define CYGVAR_KERNEL_THREADS_NAME | |
| 669 #define CYGVAR_KERNEL_THREADS_LIST | |
| 670 #define CYGFUN_KERNEL_THREADS_STACK_LIMIT | |
| 671 #define CYGVAR_KERNEL_THREADS_DATA | |
| 672 #define CYGNUM_KERNEL_THREADS_DATA_MAX 6 | |
| 673 #define CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE 2048 | |
| 674 | |
| 675 | |
| 676 /* --------------------------------------------------------------------- | |
| 677 * Synchronization primitives. | |
| 678 | |
| 679 {{CFG_DATA | |
| 680 | |
| 681 cdl_component CYGPKG_KERNEL_SYNCH { | |
| 682 display "Synchronization primitives" | |
| 683 type dummy | |
| 684 parent CYGPKG_KERNEL | |
| 685 description " | |
| 686 The eCos kernel supports a number of different | |
| 687 synchronization primitives such as mutexes, semaphores, | |
| 688 condition variables, and message boxes. There are | |
| 689 configuration options to control the exact behaviour of some | |
| 690 of these synchronization primitives. | |
| 691 " | |
| 692 doc ref/ecos-ref/thread-synchronization.html | |
| 693 } | |
| 694 | |
| 695 # NOTE: the requires statement is only valid for the current kernel. | |
| 696 # Priority inheritance is possible in other schedulers as well | |
| 697 # but is not yet implemented. | |
| 698 cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE { | |
| 699 display "Simple mutex priority inheritance" | |
| 700 requires CYGSEM_KERNEL_SCHED_MLQUEUE | |
| 701 parent CYGPKG_KERNEL_SYNCH | |
| 702 description " | |
| 703 This option enables a relatively simple implementation of | |
| 704 mutex priority inheritance. The implementation will only work | |
| 705 in the mlqueue scheduler, and it does not handle the rare | |
| 706 case of nested mutexes completely correctly. However it is | |
| 707 both fast and deterministic. Mutex priority inheritance can | |
| 708 be disabled if the application does not require it, which | |
| 709 will reduce both code size and data space." | |
| 710 doc ref/ecos-ref/synchronization.html#MUTEXES | |
| 711 } | |
| 712 | |
| 713 cdl_option CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT { | |
| 714 display "Message box blocking put support" | |
| 715 parent CYGPKG_KERNEL_SYNCH | |
| 716 description " | |
| 717 Message boxes can support three different versions of the | |
| 718 put-message operation. The first is tryput(), which will fail | |
| 719 if the message box is already full. The other two are the | |
| 720 ordinary put() function which will block if the message box | |
| 721 is full, and a timed put() operation which will block for | |
| 722 upto a certain length of time if the message box is currently | |
| 723 full. The blocking versions require extra memory in the | |
| 724 message box data structure and extra code in the other | |
| 725 message box functions, so they can be disabled if the | |
| 726 application does not require them. If this option is enabled | |
| 727 then the system will always provide the blocking put() | |
| 728 function, and it will also provide the timed put() function | |
| 729 if thread timers are enabled." | |
| 730 doc ref/ecos-ref/message-boxes.html | |
| 731 } | |
| 732 | |
| 733 cdl_option CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE { | |
| 734 display "Message box queue size" | |
| 735 parent CYGPKG_KERNEL_SYNCH | |
| 736 type count | |
| 737 legal_values 1 to 65535 | |
| 738 description " | |
| 739 This configuration option controls the number of messages | |
| 740 that can be queued in a message box before a non-blocking | |
| 741 put() operation will fail or a blocking put() operation will | |
| 742 block. The cost in memory is one pointer per message box for | |
| 743 each possible message." | |
| 744 } | |
| 745 | |
| 746 cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT { | |
| 747 display "Condition variable timed-wait support" | |
| 748 parent CYGPKG_KERNEL_SYNCH | |
| 2 | 749 requires CYGFUN_KERNEL_THREADS_TIMER |
| 0 | 750 description " |
| 751 This option enables the condition variable timed wait | |
| 752 facility." | |
| 753 doc ref/ecos-ref/synchronization.html#CONDITION-VARIABLES | |
| 754 } | |
| 755 | |
| 756 }}CFG_DATA | |
| 757 | |
| 758 */ | |
| 759 | |
| 760 #define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE | |
| 761 #define CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT | |
| 762 #define CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE 10 | |
| 763 #define CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT | |
| 764 | |
| 765 /* --------------------------------------------------------------------- | |
| 766 {{CFG_DATA | |
| 767 | |
| 768 cdl_component CYGPKG_KERNEL_INSTRUMENT { | |
| 769 display "Kernel instrumentation" | |
| 770 parent CYGPKG_KERNEL | |
| 771 description " | |
| 772 The current release of the kernel contains an initial version | |
| 773 of instrumentation support. The various parts of the kernel | |
| 774 will invoke instrumentation routines whenever appropriate | |
| 775 events occur, and these will be stored in a circular buffer | |
| 776 for later reference." | |
| 777 } | |
| 778 | |
| 779 | |
| 780 cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE { | |
| 781 display "Size of instrumentation buffer size" | |
| 782 parent CYGPKG_KERNEL_INSTRUMENT | |
| 783 type count | |
| 784 legal_values 16 to 0x100000 | |
| 785 description " | |
| 786 If kernel instrumentation is enabled then the instrumentation | |
| 787 data goes into a circular buffer. A larger buffer allows | |
| 788 more data to be stored, but at a significant cost in memory. | |
| 789 The value of this option corresponds to the number of entries | |
| 790 in the table, and typically each entry will require 16 bytes | |
| 791 of memory." | |
| 792 } | |
| 793 | |
|
6
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
794 cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_WRAP { |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
795 display "Wrap instrument buffer" |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
796 parent CYGPKG_KERNEL_INSTRUMENT |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
797 description " |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
798 When the instrumentation buffer is full it can either be restarted |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
799 from the beginning, overwriting older data, or it can stop at the |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
800 end. The former is useful if you want to look at the last entries |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
801 made while the latter is useful if you want to look at the first |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
802 few." |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
803 } |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
804 |
| 0 | 805 cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAGS { |
| 806 display "Perform selective instrumentation" | |
| 807 parent CYGPKG_KERNEL_INSTRUMENT | |
| 808 description " | |
| 809 The kernel can either collect all instrumentation events, or | |
| 810 it can filter out events at runtime based on a set of flags. | |
| 811 For example it would be possible to decide at runtime that | |
| 812 only scheduler and interrupt instrumentation flags are of | |
| 813 interest and that all other flags should be ignored. This | |
| 814 flag mechanism involves extra code and processor cycle | |
| 815 overhead in the instrumentation code, so it can be disabled | |
| 816 if the application developer is interested in all | |
| 817 instrumentation events." | |
| 818 } | |
| 819 | |
| 820 # NOTE: many of these options should only be active if the appropriate | |
| 821 # component is active. | |
| 822 cdl_option CYGDBG_KERNEL_INSTRUMENT_SCHED { | |
| 823 display "Instrument the scheduler" | |
| 824 parent CYGPKG_KERNEL_INSTRUMENT | |
| 825 description " | |
| 826 It is possible to perform selective instrumentation at | |
| 827 run-time. It is also possible to disable instrumentation | |
| 828 in various kernel components at compile-time, thus | |
| 829 reducing the code size overheads. This option controls | |
| 830 whether or not instrumentation support is compiled into | |
| 831 the scheduling code." | |
| 832 } | |
| 833 | |
| 834 cdl_option CYGDBG_KERNEL_INSTRUMENT_THREAD { | |
| 835 display "Instrument thread operations" | |
| 836 parent CYGPKG_KERNEL_INSTRUMENT | |
| 837 description " | |
| 838 It is possible to perform selective instrumentation at | |
| 839 run-time. It is also possible to disable instrumentation | |
| 840 in various kernel components at compile-time, thus | |
| 841 reducing the code size overheads. This option controls | |
| 842 whether or not instrumentation support is compiled into | |
| 843 the code that manipulates threads." | |
| 844 } | |
| 845 | |
| 846 cdl_option CYGDBG_KERNEL_INSTRUMENT_INTR { | |
| 847 display "Instrument interrupts" | |
| 848 parent CYGPKG_KERNEL_INSTRUMENT | |
| 849 description " | |
| 850 It is possible to perform selective instrumentation at | |
| 851 run-time. It is also possible to disable instrumentation | |
| 852 in various kernel components at compile-time, thus | |
| 853 reducing the code size overheads. This option controls | |
| 854 whether or not instrumentation support is compiled into | |
| 855 the interrupt handling code." | |
| 856 } | |
| 857 | |
| 858 cdl_option CYGDBG_KERNEL_INSTRUMENT_MUTEX { | |
| 859 display "Instrument mutex operations" | |
| 860 parent CYGPKG_KERNEL_INSTRUMENT | |
| 861 description " | |
| 862 It is possible to perform selective instrumentation at | |
| 863 run-time. It is also possible to disable instrumentation | |
| 864 in various kernel components at compile-time, thus | |
| 865 reducing the code size overheads. This option controls | |
| 866 whether or not instrumentation support is compiled into | |
| 867 the mutex code." | |
| 868 } | |
| 869 | |
| 870 cdl_option CYGDBG_KERNEL_INSTRUMENT_CONDVAR { | |
| 871 display "Instrument condition variable operations" | |
| 872 parent CYGPKG_KERNEL_INSTRUMENT | |
| 873 description " | |
| 874 It is possible to perform selective instrumentation at | |
| 875 run-time. It is also possible to disable instrumentation | |
| 876 in various kernel components at compile-time, thus | |
| 877 reducing the code size overheads. This option controls | |
| 878 whether or not instrumentation support is compiled into | |
| 879 the condition variable code." | |
| 880 } | |
| 881 | |
| 882 cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM { | |
| 883 display "Instrument binary semaphore operations" | |
| 884 parent CYGPKG_KERNEL_INSTRUMENT | |
| 885 description " | |
| 886 It is possible to perform selective instrumentation at | |
| 887 run-time. It is also possible to disable instrumentation | |
| 888 in various kernel components at compile-time, thus | |
| 889 reducing the code size overheads. This option controls | |
| 890 whether or not instrumentation support is compiled into | |
| 891 the binary semaphore code." | |
| 892 } | |
| 893 | |
| 894 cdl_option CYGDBG_KERNEL_INSTRUMENT_CNTSEM { | |
| 895 display "Instrument counting semaphore operations" | |
| 896 parent CYGPKG_KERNEL_INSTRUMENT | |
| 897 description " | |
| 898 It is possible to perform selective instrumentation at | |
| 899 run-time. It is also possible to disable instrumentation | |
| 900 in various kernel components at compile-time, thus | |
| 901 reducing the code size overheads. This option controls | |
| 902 whether or not instrumentation support is compiled into | |
| 903 the counting semaphore code." | |
| 904 } | |
| 905 | |
| 906 cdl_option CYGDBG_KERNEL_INSTRUMENT_MBOXT { | |
| 907 display "Instrument message box operations" | |
| 908 parent CYGPKG_KERNEL_INSTRUMENT | |
| 909 description " | |
| 910 It is possible to perform selective instrumentation at | |
| 911 run-time. It is also possible to disable instrumentation | |
| 912 in various kernel components at compile-time, thus | |
| 913 reducing the code size overheads. This option controls | |
| 914 whether or not instrumentation support is compiled into | |
| 915 the message box code." | |
| 916 } | |
| 917 | |
| 918 cdl_option CYGDBG_KERNEL_INSTRUMENT_CLOCK { | |
| 919 display "Instrument clock operations" | |
| 920 parent CYGPKG_KERNEL_INSTRUMENT | |
| 921 description " | |
| 922 It is possible to perform selective instrumentation at | |
| 923 run-time. It is also possible to disable instrumentation | |
| 924 in various kernel components at compile-time, thus | |
| 925 reducing the code size overheads. This option controls | |
| 926 whether or not instrumentation support is compiled into | |
| 927 the real-time clock code." | |
| 928 } | |
| 929 | |
| 930 cdl_option CYGDBG_KERNEL_INSTRUMENT_ALARM { | |
| 931 display "Instrument alarm-related operations" | |
| 932 parent CYGPKG_KERNEL_INSTRUMENT | |
| 933 description " | |
| 934 It is possible to perform selective instrumentation at | |
| 935 run-time. It is also possible to disable instrumentation | |
| 936 in various kernel components at compile-time, thus | |
| 937 reducing the code size overheads. This option controls | |
| 938 whether or not instrumentation support is compiled into | |
| 939 the code related to alarm operations." | |
| 940 } | |
| 941 | |
| 942 cdl_option CYGDBG_KERNEL_INSTRUMENT_USER { | |
| 943 display "Support application-level instrumentation" | |
| 944 parent CYGPKG_KERNEL_INSTRUMENT | |
| 945 description " | |
| 946 It is possible to perform selective instrumentation at | |
| 947 run-time. It is also possible to disable instrumentation | |
| 948 in various kernel components at compile-time, thus | |
| 949 reducing the code size overheads. This option controls | |
| 950 whether or not application-level instrumentation gets | |
| 951 compiled in." | |
| 952 } | |
| 953 | |
| 954 }}CFG_DATA | |
| 955 */ | |
| 956 | |
| 957 #undef CYGPKG_KERNEL_INSTRUMENT | |
| 958 #undef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER | |
| 959 #define CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE 256 | |
|
6
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
960 #define CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP |
| 0 | 961 #define CYGDBG_KERNEL_INSTRUMENT_FLAGS |
| 962 #define CYGDBG_KERNEL_INSTRUMENT_SCHED | |
| 963 #define CYGDBG_KERNEL_INSTRUMENT_THREAD | |
| 964 #define CYGDBG_KERNEL_INSTRUMENT_INTR | |
| 965 #define CYGDBG_KERNEL_INSTRUMENT_MUTEX | |
| 966 #define CYGDBG_KERNEL_INSTRUMENT_CONDVAR | |
| 967 #define CYGDBG_KERNEL_INSTRUMENT_BINSEM | |
| 968 #define CYGDBG_KERNEL_INSTRUMENT_CNTSEM | |
| 969 #define CYGDBG_KERNEL_INSTRUMENT_CLOCK | |
| 970 #define CYGDBG_KERNEL_INSTRUMENT_ALARM | |
| 971 #define CYGDBG_KERNEL_INSTRUMENT_MBOXT | |
| 972 #define CYGDBG_KERNEL_INSTRUMENT_USER | |
| 973 | |
| 974 /* --------------------------------------------------------------------- | |
| 975 * There appears to be somewhat of a lack of configuration options here. | |
| 976 {{CFG_DATA | |
| 977 | |
| 978 cdl_component CYGPKG_KERNEL_MEMORY { | |
| 979 display "Memory allocators" | |
| 980 type dummy | |
| 981 parent CYGPKG_KERNEL | |
| 982 description " | |
| 983 Configuration options related to the kernel memory allocation | |
| 984 support." | |
| 985 } | |
| 986 | |
| 987 cdl_option CYGSEM_KERNEL_MEMORY_COALESCE { | |
| 988 display "Coalesce memory in the variable-block allocator" | |
| 989 parent CYGPKG_KERNEL_MEMORY | |
| 990 description " | |
| 991 The variable-block memory allocator can perform coalescing | |
| 992 of memory whenever the application code releases memory back | |
| 993 to the pool. This coalescing reduces the possibility of | |
| 994 memory fragmentation problems, but involves extra code and | |
| 995 processor cycles." | |
| 996 } | |
| 997 | |
| 998 }}CFG_DATA */ | |
| 999 | |
| 1000 #define CYGSEM_KERNEL_MEMORY_COALESCE | |
| 1001 | |
| 1002 /* --------------------------------------------------------------------- | |
| 1003 * Options related to source-level debugging and diagnostics. | |
| 1004 | |
| 1005 {{CFG_DATA | |
| 1006 | |
| 1007 cdl_component CYGPKG_KERNEL_DEBUG { | |
| 1008 display "Source-level debugging support" | |
| 1009 type dummy | |
| 1010 parent CYGPKG_KERNEL | |
| 1011 description " | |
| 1012 If the source level debugger gdb is to be used for debugging | |
| 1013 application code then it may be necessary to configure in support | |
| 1014 for this in the kernel." | |
| 1015 } | |
| 1016 | |
| 1017 # NOTE: does this require any other support ? | |
| 1018 cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT { | |
| 1019 display "Include GDB multi-threading debug support" | |
| 1020 parent CYGPKG_KERNEL_DEBUG | |
| 1021 requires CYGVAR_KERNEL_THREADS_LIST | |
| 1022 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT | |
| 1023 description " | |
| 1024 This option enables some extra kernel code which is needed | |
| 1025 to support multi-threaded source level debugging." | |
| 1026 } | |
| 1027 | |
| 1028 }}CFG_DATA */ | |
| 1029 | |
| 1030 #define CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT | |
| 1031 | |
| 1032 /* --------------------------------------------------------------------- | |
| 1033 * Kernel API's. The C++ one is the default. A C API is optional. | |
| 1034 * Support for other languages is possible. | |
| 1035 | |
| 1036 {{CFG_DATA | |
| 1037 | |
| 1038 cdl_component CYGPKG_KERNEL_API { | |
| 1039 display "Kernel APIs" | |
| 1040 type dummy | |
| 1041 parent CYGPKG_KERNEL | |
| 1042 description " | |
| 1043 The eCos kernel is implemented in C++, so a C++ interface | |
| 1044 to the kernel is always available. There is also an optional | |
| 1045 C API. Additional API's may be provided in future versions." | |
| 2 | 1046 doc ref/ecos-ref/kernel-apis.html |
| 0 | 1047 } |
| 1048 | |
| 1049 cdl_option CYGFUN_KERNEL_API_C { | |
| 1050 display "Provide C API" | |
| 1051 parent CYGPKG_KERNEL_API | |
| 1052 description " | |
| 1053 The eCos kernel is implemented in C++, but there is an | |
| 1054 optional C API for use by application code. This C API can be | |
| 1055 disabled if the application code does not invoke the kernel | |
| 1056 directly, but instead uses higher level code such as the | |
| 1057 uITRON compatibility layer." | |
| 1058 } | |
| 1059 | |
| 1060 }}CFG_DATA */ | |
| 1061 | |
| 1062 #define CYGFUN_KERNEL_API_C | |
| 1063 | |
| 1064 /* --------------------------------------------------------------------- | |
| 1065 * The rest of this header file contains various fix-ups and | |
| 1066 * options which cannot yet be controlled via the GUI tool. | |
| 1067 * | |
| 1068 * First some miscellaneous scheduler support, all calculated. | |
| 1069 */ | |
| 1070 | |
| 1071 #if defined(CYGSEM_KERNEL_SCHED_TIMESLICE) && defined(CYGSEM_KERNEL_SCHED_BITMAP) | |
| 1072 # error Timeslicing cannot be enabled if the bitmap scheduler is used. | |
| 1073 #endif | |
| 1074 | |
| 1075 /* | |
| 1076 * These #define's are for the system's internal use only and should | |
| 1077 * not be edited by users. */ | |
| 1078 #ifdef CYGSEM_KERNEL_SCHED_BITMAP | |
| 1079 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/bitmap.hxx> | |
| 1080 #elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE) | |
| 1081 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/mlqueue.hxx> | |
| 1082 #elif defined(CYGSEM_KERNEL_SCHED_LOTTERY) | |
| 1083 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/lottery.hxx> | |
| 1084 #else | |
| 1085 #error No Scheduler defined | |
| 1086 #endif | |
| 1087 | |
| 1088 #define CYGNUM_KERNEL_SCHED_BITMAP_SIZE CYGNUM_KERNEL_SCHED_PRIORITIES | |
| 1089 | |
| 1090 /* --------------------------------------------------------------------- | |
| 1091 * Counter and clock related miscellania. | |
| 1092 * | |
| 1093 * If a real-time clock is enabled then there are additional | |
| 1094 * configuration options controlling the resolution of the clock, | |
| 1095 * CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION and | |
| 1096 * CYGNUM_KERNEL_COUNTERS_RTC_PERIOD. Different targets require | |
| 1097 * different default values, and the current configuration tool cannot | |
| 1098 * deal with this yet. Also the exact details of the resolution and | |
| 1099 * period values are still subject to change. | |
| 1100 * | |
| 1101 * To allow the clock settings to be controlled in some fashion, | |
| 1102 * there is a configuration option to override the default settings. | |
| 1103 * If this option is enabled then the resolution and period | |
| 1104 * #define's will come from configuration options (which do not | |
| 1105 * necessarily have sensible defaults, and which are not validated). | |
| 1106 * Otherwise the platform-specific numbers below are used. On | |
| 1107 * hardware this result in 100 clock interrupts every second. | |
| 1108 * For simulators slightly different values are used, so that the | |
| 1109 * various test cases run faster. | |
| 1110 */ | |
| 1111 | |
| 1112 #ifdef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 1113 | |
| 1114 # define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION \ | |
| 1115 { CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR, \ | |
| 1116 CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR } | |
| 1117 | |
| 1118 # define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD | |
| 1119 | |
| 1120 #else /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ | |
| 1121 | |
| 1122 #if defined(CYG_HAL_MN10300_STDEVAL1) | |
| 1123 | |
| 1124 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1125 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 150000 | |
| 1126 | |
| 1127 #endif | |
| 1128 #if defined(CYG_HAL_MN10300_SIM) | |
| 1129 | |
| 1130 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1131 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 9999 | |
| 1132 | |
| 1133 #endif | |
| 1134 | |
|
6
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
1135 #if defined(CYG_HAL_MIPS_TX39_JMR3904) |
| 0 | 1136 |
| 1137 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 2 | 1138 #if (CYGHWR_HAL_MIPS_CPU_FREQ == 50) |
| 1139 # define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 15360 | |
| 1140 #elif (CYGHWR_HAL_MIPS_CPU_FREQ == 66) | |
| 1141 # define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 20736 | |
| 1142 #else | |
| 1143 #error Unsupported clock frequency | |
| 1144 #endif | |
| 0 | 1145 #endif |
| 1146 | |
| 1147 #if defined(CYG_HAL_MIPS_SIM) | |
| 1148 | |
| 1149 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1150 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 999 | |
| 1151 | |
| 1152 #endif | |
| 1153 | |
|
6
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
1154 |
| 2 | 1155 #if defined(CYG_HAL_POWERPC_MPC860) |
| 0 | 1156 |
| 2 | 1157 // Period is busclock/16/100. |
| 0 | 1158 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
| 2 | 1159 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 20833 |
| 0 | 1160 |
| 1161 #endif | |
| 1162 | |
| 2 | 1163 #if defined(CYG_HAL_ARM_PID) |
| 1164 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1165 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 12500 | |
| 1166 #endif | |
| 1167 #if defined(CYG_HAL_ARM_AEB) | |
| 1168 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1169 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD (240000/16) | |
| 1170 #endif | |
| 1171 | |
| 1172 #if defined(CYG_HAL_I386_LINUX) | |
| 1173 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1174 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 10000 | |
| 1175 #endif | |
| 0 | 1176 |
| 1177 #ifndef CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION | |
| 1178 | |
| 1179 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} | |
| 1180 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 9999 | |
| 1181 | |
| 1182 #endif | |
| 1183 | |
| 1184 #endif /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ | |
| 1185 | |
| 1186 /* --------------------------------------------------------------------- | |
| 1187 * Thread-related miscellania. | |
| 1188 * | |
| 1189 * These options provide for an assertion that the count value for counted | |
| 1190 * thread wakeups or for thread suspends do not exceed set limits. This is | |
| 1191 * to help with debugging, to allow a runaaway loop, for example, to be | |
| 1192 * detected more easily. | |
| 1193 * | |
| 1194 * If the option is not defined, no assert is included. Whether asserts | |
| 1195 * are themselves included depends on infrastructure configury in infra.h | |
| 1196 * | |
| 1197 * It is hoped that these defaults are helpful rather than interfering. | |
| 1198 */ | |
| 2 | 1199 #define CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT (500) |
| 1200 #define CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT (500) | |
| 0 | 1201 |
| 1202 /* | |
| 1203 * If the scheduler configuration only has a single priority level, | |
| 1204 * then the idle thread must yield each time around its loop. | |
| 1205 */ | |
| 1206 | |
| 1207 #if CYGNUM_KERNEL_SCHED_PRIORITIES == 1 | |
| 1208 # define CYGIMP_IDLE_THREAD_YIELD | |
| 1209 #endif | |
| 1210 | |
| 1211 /* | |
| 1212 * Per thread data options. Per thread data suuport is based loosely | |
| 1213 * on that define by POSIX. Each thread has an array of slots, up to | |
| 1214 * CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the | |
| 1215 * slots have been preallocated to specific packages. Others may be | |
| 1216 * allocated dynamically. | |
| 1217 */ | |
| 1218 | |
| 1219 #define CYGNUM_KERNEL_THREADS_DATA_KERNEL 0 | |
| 1220 #define CYGNUM_KERNEL_THREADS_DATA_ITRON 1 | |
| 1221 #define CYGNUM_KERNEL_THREADS_DATA_LIBC 2 | |
| 1222 #define CYGNUM_KERNEL_THREADS_DATA_POSIX 3 | |
| 1223 | |
| 1224 #define CYGNUM_KERNEL_THREADS_DATA_ALL 0xF | |
| 1225 | |
| 1226 /* | |
| 1227 * Some consistency checks. | |
| 1228 */ | |
| 1229 #if defined(CYGFUN_KERNEL_THREADS_TIMER) && !defined(CYGVAR_KERNEL_COUNTERS_CLOCK) | |
| 1230 # error "Cannot have Thread Timers without Real Time Clock" | |
| 1231 #endif | |
| 1232 | |
| 1233 #if defined(CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT) && !defined(CYGVAR_KERNEL_THREADS_LIST) | |
| 1234 # error "GDB thread support requires a list of all known threads." | |
| 1235 #endif | |
| 1236 | |
| 1237 /* --------------------------------------------------------------------- | |
| 1238 * Synchronization primitives miscellania. | |
| 1239 * | |
| 1240 * These lines should not be edited by users. | |
| 1241 */ | |
| 1242 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE | |
| 1243 # define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE | |
| 1244 #endif | |
| 1245 #if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE) && !defined(CYGSEM_KERNEL_SCHED_MLQUEUE) | |
| 1246 # error "Priority inheritance can only be enabled if the mlqueue scheduler is used." | |
| 1247 #endif | |
| 1248 | |
| 1249 /* --------------------------------------------------------------------- | |
| 1250 * This code allows the kernel build to be configured as a GDB | |
| 1251 * stub ROM monitor. It is only intended for internal use. | |
| 1252 */ | |
| 1253 | |
| 1254 /* | |
| 1255 * BLV: This code must be kept commented out for now, as it can | |
| 1256 * confuse the configuration tool. The correct solution is to have a | |
| 1257 * standard configuration for the system as represented by e.g. a | |
| 1258 * .ptest file which does the right thing. A ROM monitor is an | |
| 1259 * application, and application-specific configuration stuff should | |
| 1260 * not live in the master header file. | |
| 1261 */ | |
| 1262 | |
| 1263 /* | |
| 1264 #undef CYG_HAL_ROM_MONITOR | |
| 1265 | |
| 1266 #ifdef CYG_HAL_ROM_MONITOR | |
| 1267 | |
| 1268 #undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT | |
| 1269 #undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT | |
| 1270 #undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK | |
| 1271 #undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING | |
| 1272 #undef CYGIMP_KERNEL_INTERRUPTS_CHAIN | |
| 1273 #undef CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 1274 #undef CYGFUN_KERNEL_THREADS_TIMER | |
| 1275 #undef CYGPKG_KERNEL_EXCEPTIONS | |
| 2 | 1276 #undef CYGSEM_KERNEL_SCHED_TIMESLICE |
| 0 | 1277 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE |
| 1278 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE | |
| 1279 #undef CYGPKG_KERNEL_INSTRUMENT | |
| 1280 #undef CYGDBG_INFRA_DIAG_USE_DEVICE // now lives in infra | |
| 1281 | |
| 2 | 1282 #define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
| 0 | 1283 |
| 1284 #endif | |
| 1285 */ | |
| 1286 | |
| 1287 /* -------------------------------------------------------------------*/ | |
| 1288 | |
| 1289 #endif /* ifdef CYGPKG_KERNEL */ | |
| 1290 | |
| 1291 /* -------------------------------------------------------------------*/ | |
| 1292 #endif /* CYGONCE_PKGCONF_KERNEL_H */ | |
| 1293 /* EOF kernel.h */ |
