Mercurial > ecos-v2_0-branch
annotate packages/kernel/current/include/pkgconf/kernel.h @ 34:29bc183297e1 ecos-sw-1999-09-02
Merge from eCos master repository on 1999-09-02-16:26:10-BST
| author | jlarmour |
|---|---|
| date | Thu, 02 Sep 1999 16:11:22 +0000 |
| parents | ece80412419a |
| children | 7a6ac9edc838 |
| 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." | |
|
34
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
538 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
539 } |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
540 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
541 cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY { |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
542 display "Measure real-time [clock] DSR latency" |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
543 parent CYGPKG_KERNEL_COUNTERS |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
544 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
545 requires CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
546 description " |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
547 Measure the DSR latency as seen by the real-time clock |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
548 timer interrupt. This requires hardware support, defined by |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
549 the HAL_CLOCK_LATENCY() macro." |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
550 doc ref/ecos-ref/counters-clocks-and-alarms.html |
| 2 | 551 } |
| 552 | |
| 0 | 553 }}CFG_DATA */ |
| 554 | |
| 555 #define CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 556 #undef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 557 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD 9999 | |
| 558 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR 1000000000 | |
| 559 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR 100 | |
| 560 #define CYGIMP_KERNEL_COUNTERS_SINGLE_LIST | |
| 561 #undef CYGIMP_KERNEL_COUNTERS_MULTI_LIST | |
| 562 #define CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE 8 | |
| 2 | 563 #undef CYGIMP_KERNEL_COUNTERS_SORT_LIST |
| 564 #undef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY | |
|
34
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
8
diff
changeset
|
565 #undef CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY |
| 0 | 566 |
| 567 /* --------------------------------------------------------------------- | |
| 568 * Thread-related options | |
| 569 {{CFG_DATA | |
| 570 | |
| 571 cdl_component CYGPKG_KERNEL_THREADS { | |
| 572 display "Thread-related options" | |
| 573 type dummy | |
| 574 parent CYGPKG_KERNEL | |
| 575 description " | |
| 576 There are a number of configuration options related to the | |
| 577 implementation of threads, for example whether or not the | |
| 578 eCos kernel supports per-thread data." | |
| 579 doc ref/ecos-ref/thread-operations.html | |
| 580 } | |
| 581 | |
| 582 cdl_option CYGFUN_KERNEL_THREADS_TIMER { | |
| 583 display "Allow per-thread timers" | |
| 584 parent CYGPKG_KERNEL_THREADS | |
| 585 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 586 description " | |
| 587 This option controls whether or not the kernel should support | |
| 588 per-thread clock and alarm related functions. Also some of | |
| 589 the synchronization primitives such as semaphore and | |
| 590 condition variable timed wait operations require per-thread | |
| 591 timer support. If none of these facilities are required then | |
| 592 the option can be disabled." | |
| 593 doc ref/ecos-ref/thread-operations.html | |
| 594 } | |
| 595 | |
| 596 cdl_option CYGVAR_KERNEL_THREADS_NAME { | |
| 597 display "Support optional name for each thread" | |
| 598 parent CYGPKG_KERNEL_THREADS | |
| 599 description " | |
| 600 Threads may optionally be supplied with a name string that is | |
| 601 used to identify them during debugging. This name is only | |
| 602 present if `this option is defined. Disabling it reduces both | |
| 603 code and data size." | |
| 604 doc ref/ecos-ref/thread-operations.html | |
| 605 } | |
| 606 | |
| 607 cdl_option CYGVAR_KERNEL_THREADS_LIST { | |
| 608 display "Keep track of all threads using a linked list" | |
| 609 parent CYGPKG_KERNEL_THREADS | |
| 610 description " | |
| 611 Threads may optionally be placed on a housekeeping list so | |
| 612 that all threads may be located easily. This is useful mainly | |
| 613 in conjunction with source-level debugging." | |
| 614 doc ref/ecos-ref/thread-operations.html | |
| 615 } | |
| 616 | |
| 617 cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT { | |
| 618 display "Keep track of the base of each thread's stack" | |
| 619 parent CYGPKG_KERNEL_THREADS | |
| 620 description " | |
| 621 This option makes the kernel keep track of the lower limit on | |
| 622 each thread's stack. It allows the kernel to adjust the lower | |
| 623 limit, thus making space for per-thread data. Note that it | |
| 624 does not imply any form of run-time stack overflow checking." | |
| 625 doc ref/ecos-ref/thread-operations.html | |
| 626 } | |
| 627 | |
| 628 cdl_option CYGVAR_KERNEL_THREADS_DATA { | |
| 629 display "Support for per-thread data" | |
| 630 parent CYGPKG_KERNEL_THREADS | |
| 631 requires CYGFUN_KERNEL_THREADS_STACK_LIMIT | |
| 632 description " | |
| 633 It is possible for the kernel to support per-thread data, in | |
| 634 other words an area of memory specific to each thread which | |
| 635 can be used to store data for that thread. This per-thread | |
| 636 data can be used by applications or by other packages such as | |
| 637 the ISO C library." | |
| 638 doc ref/ecos-ref/thread-operations.html | |
| 639 } | |
| 640 | |
| 641 cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX { | |
| 642 display "Number of words of per-thread data" | |
| 643 parent CYGPKG_KERNEL_THREADS | |
| 644 #active_if CYGVAR_KERNEL_THREADS_DATA | |
| 645 type count | |
| 646 legal_values 1 to 65535 | |
| 647 description " | |
| 648 It is possible for the kernel to support per-thread data, in | |
| 649 other words an area of memory specific to each thread which | |
| 650 can be used to store data for that thread. This per-thread | |
| 651 data can be used by applications or by other packages such as | |
| 652 the ISO C library. This configuration option controls the | |
| 653 number of words of per-thread data that the kernel will | |
| 654 allow." | |
| 655 doc ref/ecos-ref/thread-operations.html | |
| 656 } | |
| 657 | |
| 658 cdl_option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE { | |
| 659 display "Stack size for the idle thread" | |
| 660 parent CYGPKG_KERNEL_THREADS | |
| 661 type count | |
| 662 legal_values 512 to 65536 | |
| 663 description " | |
| 664 This configuration option specifies the stack size in bytes | |
| 665 for the idle thread. Unless the HAL is configured to use a | |
| 666 separate interrupt stack this size must be sufficient to meet | |
| 667 the requirements of all interrupt handlers - these | |
| 668 requirements are cumulative if nested interrupted are | |
| 669 enabled. Depending on the target architecture, the stack size | |
| 2 | 670 typically has to be a multiple of eight or sixteen bytes. |
| 671 This will be overridden where it is used if the | |
| 672 architectural HAL requires a minimum stack size | |
| 673 to handle interrupts correctly." | |
| 674 | |
| 0 | 675 doc ref/ecos-ref/thread-operations.html |
| 676 } | |
| 677 | |
| 678 }}CFG_DATA */ | |
| 679 | |
| 680 #define CYGFUN_KERNEL_THREADS_TIMER | |
| 681 #define CYGVAR_KERNEL_THREADS_NAME | |
| 682 #define CYGVAR_KERNEL_THREADS_LIST | |
| 683 #define CYGFUN_KERNEL_THREADS_STACK_LIMIT | |
| 684 #define CYGVAR_KERNEL_THREADS_DATA | |
| 685 #define CYGNUM_KERNEL_THREADS_DATA_MAX 6 | |
| 686 #define CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE 2048 | |
| 687 | |
| 688 | |
| 689 /* --------------------------------------------------------------------- | |
| 690 * Synchronization primitives. | |
| 691 | |
| 692 {{CFG_DATA | |
| 693 | |
| 694 cdl_component CYGPKG_KERNEL_SYNCH { | |
| 695 display "Synchronization primitives" | |
| 696 type dummy | |
| 697 parent CYGPKG_KERNEL | |
| 698 description " | |
| 699 The eCos kernel supports a number of different | |
| 700 synchronization primitives such as mutexes, semaphores, | |
| 701 condition variables, and message boxes. There are | |
| 702 configuration options to control the exact behaviour of some | |
| 703 of these synchronization primitives. | |
| 704 " | |
| 705 doc ref/ecos-ref/thread-synchronization.html | |
| 706 } | |
| 707 | |
| 708 # NOTE: the requires statement is only valid for the current kernel. | |
| 709 # Priority inheritance is possible in other schedulers as well | |
| 710 # but is not yet implemented. | |
| 711 cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE { | |
| 712 display "Simple mutex priority inheritance" | |
| 713 requires CYGSEM_KERNEL_SCHED_MLQUEUE | |
| 714 parent CYGPKG_KERNEL_SYNCH | |
| 715 description " | |
| 716 This option enables a relatively simple implementation of | |
| 717 mutex priority inheritance. The implementation will only work | |
| 718 in the mlqueue scheduler, and it does not handle the rare | |
| 719 case of nested mutexes completely correctly. However it is | |
| 720 both fast and deterministic. Mutex priority inheritance can | |
| 721 be disabled if the application does not require it, which | |
| 722 will reduce both code size and data space." | |
| 723 doc ref/ecos-ref/synchronization.html#MUTEXES | |
| 724 } | |
| 725 | |
| 726 cdl_option CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT { | |
| 727 display "Message box blocking put support" | |
| 728 parent CYGPKG_KERNEL_SYNCH | |
| 729 description " | |
| 730 Message boxes can support three different versions of the | |
| 731 put-message operation. The first is tryput(), which will fail | |
| 732 if the message box is already full. The other two are the | |
| 733 ordinary put() function which will block if the message box | |
| 734 is full, and a timed put() operation which will block for | |
| 735 upto a certain length of time if the message box is currently | |
| 736 full. The blocking versions require extra memory in the | |
| 737 message box data structure and extra code in the other | |
| 738 message box functions, so they can be disabled if the | |
| 739 application does not require them. If this option is enabled | |
| 740 then the system will always provide the blocking put() | |
| 741 function, and it will also provide the timed put() function | |
| 742 if thread timers are enabled." | |
| 743 doc ref/ecos-ref/message-boxes.html | |
| 744 } | |
| 745 | |
| 746 cdl_option CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE { | |
| 747 display "Message box queue size" | |
| 748 parent CYGPKG_KERNEL_SYNCH | |
| 749 type count | |
| 750 legal_values 1 to 65535 | |
| 751 description " | |
| 752 This configuration option controls the number of messages | |
| 753 that can be queued in a message box before a non-blocking | |
| 754 put() operation will fail or a blocking put() operation will | |
| 755 block. The cost in memory is one pointer per message box for | |
| 756 each possible message." | |
| 757 } | |
| 758 | |
| 759 cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT { | |
| 760 display "Condition variable timed-wait support" | |
| 761 parent CYGPKG_KERNEL_SYNCH | |
| 2 | 762 requires CYGFUN_KERNEL_THREADS_TIMER |
| 0 | 763 description " |
| 764 This option enables the condition variable timed wait | |
| 765 facility." | |
| 766 doc ref/ecos-ref/synchronization.html#CONDITION-VARIABLES | |
| 767 } | |
| 768 | |
| 769 }}CFG_DATA | |
| 770 | |
| 771 */ | |
| 772 | |
| 773 #define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE | |
| 774 #define CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT | |
| 775 #define CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE 10 | |
| 776 #define CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT | |
| 777 | |
| 778 /* --------------------------------------------------------------------- | |
| 779 {{CFG_DATA | |
| 780 | |
| 781 cdl_component CYGPKG_KERNEL_INSTRUMENT { | |
| 782 display "Kernel instrumentation" | |
| 783 parent CYGPKG_KERNEL | |
| 784 description " | |
| 785 The current release of the kernel contains an initial version | |
| 786 of instrumentation support. The various parts of the kernel | |
| 787 will invoke instrumentation routines whenever appropriate | |
| 788 events occur, and these will be stored in a circular buffer | |
| 789 for later reference." | |
| 790 } | |
| 791 | |
| 792 | |
| 793 cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE { | |
| 794 display "Size of instrumentation buffer size" | |
| 795 parent CYGPKG_KERNEL_INSTRUMENT | |
| 796 type count | |
| 797 legal_values 16 to 0x100000 | |
| 798 description " | |
| 799 If kernel instrumentation is enabled then the instrumentation | |
| 800 data goes into a circular buffer. A larger buffer allows | |
| 801 more data to be stored, but at a significant cost in memory. | |
| 802 The value of this option corresponds to the number of entries | |
| 803 in the table, and typically each entry will require 16 bytes | |
| 804 of memory." | |
| 805 } | |
| 806 | |
|
6
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
807 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
|
808 display "Wrap instrument buffer" |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
809 parent CYGPKG_KERNEL_INSTRUMENT |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
810 description " |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
811 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
|
812 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
|
813 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
|
814 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
|
815 few." |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
816 } |
|
d376b777e2ce
Merge from eCos master repository on 1999-05-14-19:27:43-BST
jlarmour
parents:
2
diff
changeset
|
817 |
| 0 | 818 cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAGS { |
| 819 display "Perform selective instrumentation" | |
| 820 parent CYGPKG_KERNEL_INSTRUMENT | |
| 821 description " | |
| 822 The kernel can either collect all instrumentation events, or | |
| 823 it can filter out events at runtime based on a set of flags. | |
| 824 For example it would be possible to decide at runtime that | |
| 825 only scheduler and interrupt instrumentation flags are of | |
| 826 interest and that all other flags should be ignored. This | |
| 827 flag mechanism involves extra code and processor cycle | |
| 828 overhead in the instrumentation code, so it can be disabled | |
| 829 if the application developer is interested in all | |
| 830 instrumentation events." | |
| 831 } | |
| 832 | |
| 833 # NOTE: many of these options should only be active if the appropriate | |
| 834 # component is active. | |
| 835 cdl_option CYGDBG_KERNEL_INSTRUMENT_SCHED { | |
| 836 display "Instrument the scheduler" | |
| 837 parent CYGPKG_KERNEL_INSTRUMENT | |
| 838 description " | |
| 839 It is possible to perform selective instrumentation at | |
| 840 run-time. It is also possible to disable instrumentation | |
| 841 in various kernel components at compile-time, thus | |
| 842 reducing the code size overheads. This option controls | |
| 843 whether or not instrumentation support is compiled into | |
| 844 the scheduling code." | |
| 845 } | |
| 846 | |
| 847 cdl_option CYGDBG_KERNEL_INSTRUMENT_THREAD { | |
| 848 display "Instrument thread operations" | |
| 849 parent CYGPKG_KERNEL_INSTRUMENT | |
| 850 description " | |
| 851 It is possible to perform selective instrumentation at | |
| 852 run-time. It is also possible to disable instrumentation | |
| 853 in various kernel components at compile-time, thus | |
| 854 reducing the code size overheads. This option controls | |
| 855 whether or not instrumentation support is compiled into | |
| 856 the code that manipulates threads." | |
| 857 } | |
| 858 | |
| 859 cdl_option CYGDBG_KERNEL_INSTRUMENT_INTR { | |
| 860 display "Instrument interrupts" | |
| 861 parent CYGPKG_KERNEL_INSTRUMENT | |
| 862 description " | |
| 863 It is possible to perform selective instrumentation at | |
| 864 run-time. It is also possible to disable instrumentation | |
| 865 in various kernel components at compile-time, thus | |
| 866 reducing the code size overheads. This option controls | |
| 867 whether or not instrumentation support is compiled into | |
| 868 the interrupt handling code." | |
| 869 } | |
| 870 | |
| 871 cdl_option CYGDBG_KERNEL_INSTRUMENT_MUTEX { | |
| 872 display "Instrument mutex operations" | |
| 873 parent CYGPKG_KERNEL_INSTRUMENT | |
| 874 description " | |
| 875 It is possible to perform selective instrumentation at | |
| 876 run-time. It is also possible to disable instrumentation | |
| 877 in various kernel components at compile-time, thus | |
| 878 reducing the code size overheads. This option controls | |
| 879 whether or not instrumentation support is compiled into | |
| 880 the mutex code." | |
| 881 } | |
| 882 | |
| 883 cdl_option CYGDBG_KERNEL_INSTRUMENT_CONDVAR { | |
| 884 display "Instrument condition variable operations" | |
| 885 parent CYGPKG_KERNEL_INSTRUMENT | |
| 886 description " | |
| 887 It is possible to perform selective instrumentation at | |
| 888 run-time. It is also possible to disable instrumentation | |
| 889 in various kernel components at compile-time, thus | |
| 890 reducing the code size overheads. This option controls | |
| 891 whether or not instrumentation support is compiled into | |
| 892 the condition variable code." | |
| 893 } | |
| 894 | |
| 895 cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM { | |
| 896 display "Instrument binary semaphore operations" | |
| 897 parent CYGPKG_KERNEL_INSTRUMENT | |
| 898 description " | |
| 899 It is possible to perform selective instrumentation at | |
| 900 run-time. It is also possible to disable instrumentation | |
| 901 in various kernel components at compile-time, thus | |
| 902 reducing the code size overheads. This option controls | |
| 903 whether or not instrumentation support is compiled into | |
| 904 the binary semaphore code." | |
| 905 } | |
| 906 | |
| 907 cdl_option CYGDBG_KERNEL_INSTRUMENT_CNTSEM { | |
| 908 display "Instrument counting semaphore operations" | |
| 909 parent CYGPKG_KERNEL_INSTRUMENT | |
| 910 description " | |
| 911 It is possible to perform selective instrumentation at | |
| 912 run-time. It is also possible to disable instrumentation | |
| 913 in various kernel components at compile-time, thus | |
| 914 reducing the code size overheads. This option controls | |
| 915 whether or not instrumentation support is compiled into | |
| 916 the counting semaphore code." | |
| 917 } | |
| 918 | |
| 919 cdl_option CYGDBG_KERNEL_INSTRUMENT_MBOXT { | |
| 920 display "Instrument message box operations" | |
| 921 parent CYGPKG_KERNEL_INSTRUMENT | |
| 922 description " | |
| 923 It is possible to perform selective instrumentation at | |
| 924 run-time. It is also possible to disable instrumentation | |
| 925 in various kernel components at compile-time, thus | |
| 926 reducing the code size overheads. This option controls | |
| 927 whether or not instrumentation support is compiled into | |
| 928 the message box code." | |
| 929 } | |
| 930 | |
| 931 cdl_option CYGDBG_KERNEL_INSTRUMENT_CLOCK { | |
| 932 display "Instrument clock operations" | |
| 933 parent CYGPKG_KERNEL_INSTRUMENT | |
| 934 description " | |
| 935 It is possible to perform selective instrumentation at | |
| 936 run-time. It is also possible to disable instrumentation | |
| 937 in various kernel components at compile-time, thus | |
| 938 reducing the code size overheads. This option controls | |
| 939 whether or not instrumentation support is compiled into | |
| 940 the real-time clock code." | |
| 941 } | |
| 942 | |
| 943 cdl_option CYGDBG_KERNEL_INSTRUMENT_ALARM { | |
| 944 display "Instrument alarm-related operations" | |
| 945 parent CYGPKG_KERNEL_INSTRUMENT | |
| 946 description " | |
| 947 It is possible to perform selective instrumentation at | |
| 948 run-time. It is also possible to disable instrumentation | |
| 949 in various kernel components at compile-time, thus | |
| 950 reducing the code size overheads. This option controls | |
| 951 whether or not instrumentation support is compiled into | |
| 952 the code related to alarm operations." | |
| 953 } | |
| 954 | |
| 955 cdl_option CYGDBG_KERNEL_INSTRUMENT_USER { | |
| 956 display "Support application-level instrumentation" | |
| 957 parent CYGPKG_KERNEL_INSTRUMENT | |
| 958 description " | |
| 959 It is possible to perform selective instrumentation at | |
| 960 run-time. It is also possible to disable instrumentation | |
| 961 in various kernel components at compile-time, thus | |
| 962 reducing the code size overheads. This option controls | |
| 963 whether or not application-level instrumentation gets | |
| 964 compiled in." | |
| 965 } | |
| 966 | |
| 967 }}CFG_DATA | |
| 968 */ | |
| 969 | |
| 970 #undef CYGPKG_KERNEL_INSTRUMENT | |
| 971 #undef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER | |
| 972 #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
|
973 #define CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP |
| 0 | 974 #define CYGDBG_KERNEL_INSTRUMENT_FLAGS |
| 975 #define CYGDBG_KERNEL_INSTRUMENT_SCHED | |
| 976 #define CYGDBG_KERNEL_INSTRUMENT_THREAD | |
| 977 #define CYGDBG_KERNEL_INSTRUMENT_INTR | |
| 978 #define CYGDBG_KERNEL_INSTRUMENT_MUTEX | |
| 979 #define CYGDBG_KERNEL_INSTRUMENT_CONDVAR | |
| 980 #define CYGDBG_KERNEL_INSTRUMENT_BINSEM | |
| 981 #define CYGDBG_KERNEL_INSTRUMENT_CNTSEM | |
| 982 #define CYGDBG_KERNEL_INSTRUMENT_CLOCK | |
| 983 #define CYGDBG_KERNEL_INSTRUMENT_ALARM | |
| 984 #define CYGDBG_KERNEL_INSTRUMENT_MBOXT | |
| 985 #define CYGDBG_KERNEL_INSTRUMENT_USER | |
| 986 | |
| 987 /* --------------------------------------------------------------------- | |
| 988 * There appears to be somewhat of a lack of configuration options here. | |
| 989 {{CFG_DATA | |
| 990 | |
| 991 cdl_component CYGPKG_KERNEL_MEMORY { | |
| 992 display "Memory allocators" | |
| 993 type dummy | |
| 994 parent CYGPKG_KERNEL | |
| 995 description " | |
| 996 Configuration options related to the kernel memory allocation | |
| 997 support." | |
| 998 } | |
| 999 | |
| 1000 cdl_option CYGSEM_KERNEL_MEMORY_COALESCE { | |
| 1001 display "Coalesce memory in the variable-block allocator" | |
| 1002 parent CYGPKG_KERNEL_MEMORY | |
| 1003 description " | |
| 1004 The variable-block memory allocator can perform coalescing | |
| 1005 of memory whenever the application code releases memory back | |
| 1006 to the pool. This coalescing reduces the possibility of | |
| 1007 memory fragmentation problems, but involves extra code and | |
| 1008 processor cycles." | |
| 1009 } | |
| 1010 | |
| 1011 }}CFG_DATA */ | |
| 1012 | |
| 1013 #define CYGSEM_KERNEL_MEMORY_COALESCE | |
| 1014 | |
| 1015 /* --------------------------------------------------------------------- | |
| 1016 * Options related to source-level debugging and diagnostics. | |
| 1017 | |
| 1018 {{CFG_DATA | |
| 1019 | |
| 1020 cdl_component CYGPKG_KERNEL_DEBUG { | |
| 1021 display "Source-level debugging support" | |
| 1022 type dummy | |
| 1023 parent CYGPKG_KERNEL | |
| 1024 description " | |
| 1025 If the source level debugger gdb is to be used for debugging | |
| 1026 application code then it may be necessary to configure in support | |
| 1027 for this in the kernel." | |
| 1028 } | |
| 1029 | |
| 1030 # NOTE: does this require any other support ? | |
| 1031 cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT { | |
| 1032 display "Include GDB multi-threading debug support" | |
| 1033 parent CYGPKG_KERNEL_DEBUG | |
| 1034 requires CYGVAR_KERNEL_THREADS_LIST | |
| 1035 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT | |
| 1036 description " | |
| 1037 This option enables some extra kernel code which is needed | |
| 1038 to support multi-threaded source level debugging." | |
| 1039 } | |
| 1040 | |
| 1041 }}CFG_DATA */ | |
| 1042 | |
| 1043 #define CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT | |
| 1044 | |
| 1045 /* --------------------------------------------------------------------- | |
| 1046 * Kernel API's. The C++ one is the default. A C API is optional. | |
| 1047 * Support for other languages is possible. | |
| 1048 | |
| 1049 {{CFG_DATA | |
| 1050 | |
| 1051 cdl_component CYGPKG_KERNEL_API { | |
| 1052 display "Kernel APIs" | |
| 1053 type dummy | |
| 1054 parent CYGPKG_KERNEL | |
| 1055 description " | |
| 1056 The eCos kernel is implemented in C++, so a C++ interface | |
| 1057 to the kernel is always available. There is also an optional | |
| 1058 C API. Additional API's may be provided in future versions." | |
| 2 | 1059 doc ref/ecos-ref/kernel-apis.html |
| 0 | 1060 } |
| 1061 | |
| 1062 cdl_option CYGFUN_KERNEL_API_C { | |
| 1063 display "Provide C API" | |
| 1064 parent CYGPKG_KERNEL_API | |
| 1065 description " | |
| 1066 The eCos kernel is implemented in C++, but there is an | |
| 1067 optional C API for use by application code. This C API can be | |
| 1068 disabled if the application code does not invoke the kernel | |
| 1069 directly, but instead uses higher level code such as the | |
| 1070 uITRON compatibility layer." | |
| 1071 } | |
| 1072 | |
| 1073 }}CFG_DATA */ | |
| 1074 | |
| 1075 #define CYGFUN_KERNEL_API_C | |
| 1076 | |
| 1077 /* --------------------------------------------------------------------- | |
| 1078 * The rest of this header file contains various fix-ups and | |
| 1079 * options which cannot yet be controlled via the GUI tool. | |
| 1080 * | |
| 1081 * First some miscellaneous scheduler support, all calculated. | |
| 1082 */ | |
| 1083 | |
| 1084 #if defined(CYGSEM_KERNEL_SCHED_TIMESLICE) && defined(CYGSEM_KERNEL_SCHED_BITMAP) | |
| 1085 # error Timeslicing cannot be enabled if the bitmap scheduler is used. | |
| 1086 #endif | |
| 1087 | |
| 1088 /* | |
| 1089 * These #define's are for the system's internal use only and should | |
| 1090 * not be edited by users. */ | |
| 1091 #ifdef CYGSEM_KERNEL_SCHED_BITMAP | |
| 1092 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/bitmap.hxx> | |
| 1093 #elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE) | |
| 1094 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/mlqueue.hxx> | |
| 1095 #elif defined(CYGSEM_KERNEL_SCHED_LOTTERY) | |
| 1096 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/lottery.hxx> | |
| 1097 #else | |
| 1098 #error No Scheduler defined | |
| 1099 #endif | |
| 1100 | |
| 1101 #define CYGNUM_KERNEL_SCHED_BITMAP_SIZE CYGNUM_KERNEL_SCHED_PRIORITIES | |
| 1102 | |
| 1103 /* --------------------------------------------------------------------- | |
| 1104 * Counter and clock related miscellania. | |
| 1105 * | |
| 1106 * If a real-time clock is enabled then there are additional | |
| 1107 * configuration options controlling the resolution of the clock, | |
| 1108 * CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION and | |
| 1109 * CYGNUM_KERNEL_COUNTERS_RTC_PERIOD. Different targets require | |
| 1110 * different default values, and the current configuration tool cannot | |
| 1111 * deal with this yet. Also the exact details of the resolution and | |
| 1112 * period values are still subject to change. | |
| 1113 * | |
| 1114 * To allow the clock settings to be controlled in some fashion, | |
| 1115 * there is a configuration option to override the default settings. | |
| 1116 * If this option is enabled then the resolution and period | |
| 1117 * #define's will come from configuration options (which do not | |
| 1118 * necessarily have sensible defaults, and which are not validated). | |
| 1119 * Otherwise the platform-specific numbers below are used. On | |
| 1120 * hardware this result in 100 clock interrupts every second. | |
| 1121 * For simulators slightly different values are used, so that the | |
| 1122 * various test cases run faster. | |
| 1123 */ | |
| 1124 | |
| 1125 #ifdef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE | |
| 1126 | |
| 1127 # define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION \ | |
| 1128 { CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR, \ | |
| 1129 CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR } | |
| 1130 | |
| 1131 # define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD | |
| 1132 | |
| 1133 #else /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ | |
| 1134 | |
|
8
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1135 // Include HAL/Platform specifics |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1136 #include CYGBLD_HAL_PLATFORM_H |
| 0 | 1137 |
|
8
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1138 // Fallback defaults (in case HAL didn't define these) |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1139 #ifndef CYGNUM_HAL_RTC_NUMERATOR |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1140 #define CYGNUM_HAL_RTC_NUMERATOR 1000000000 |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1141 #define CYGNUM_HAL_RTC_DENOMINATOR 100 |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1142 #define CYGNUM_HAL_RTC_PERIOD 9999 |
| 0 | 1143 #endif |
| 1144 | |
|
8
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1145 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION \ |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1146 {CYGNUM_HAL_RTC_NUMERATOR, CYGNUM_HAL_RTC_DENOMINATOR} |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1147 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD \ |
|
ece80412419a
Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents:
6
diff
changeset
|
1148 CYGNUM_HAL_RTC_PERIOD |
| 0 | 1149 |
| 1150 #endif /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ | |
| 1151 | |
| 1152 /* --------------------------------------------------------------------- | |
| 1153 * Thread-related miscellania. | |
| 1154 * | |
| 1155 * These options provide for an assertion that the count value for counted | |
| 1156 * thread wakeups or for thread suspends do not exceed set limits. This is | |
| 1157 * to help with debugging, to allow a runaaway loop, for example, to be | |
| 1158 * detected more easily. | |
| 1159 * | |
| 1160 * If the option is not defined, no assert is included. Whether asserts | |
| 1161 * are themselves included depends on infrastructure configury in infra.h | |
| 1162 * | |
| 1163 * It is hoped that these defaults are helpful rather than interfering. | |
| 1164 */ | |
| 2 | 1165 #define CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT (500) |
| 1166 #define CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT (500) | |
| 0 | 1167 |
| 1168 /* | |
| 1169 * If the scheduler configuration only has a single priority level, | |
| 1170 * then the idle thread must yield each time around its loop. | |
| 1171 */ | |
| 1172 | |
| 1173 #if CYGNUM_KERNEL_SCHED_PRIORITIES == 1 | |
| 1174 # define CYGIMP_IDLE_THREAD_YIELD | |
| 1175 #endif | |
| 1176 | |
| 1177 /* | |
| 1178 * Per thread data options. Per thread data suuport is based loosely | |
| 1179 * on that define by POSIX. Each thread has an array of slots, up to | |
| 1180 * CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the | |
| 1181 * slots have been preallocated to specific packages. Others may be | |
| 1182 * allocated dynamically. | |
| 1183 */ | |
| 1184 | |
| 1185 #define CYGNUM_KERNEL_THREADS_DATA_KERNEL 0 | |
| 1186 #define CYGNUM_KERNEL_THREADS_DATA_ITRON 1 | |
| 1187 #define CYGNUM_KERNEL_THREADS_DATA_LIBC 2 | |
| 1188 #define CYGNUM_KERNEL_THREADS_DATA_POSIX 3 | |
| 1189 | |
| 1190 #define CYGNUM_KERNEL_THREADS_DATA_ALL 0xF | |
| 1191 | |
| 1192 /* | |
| 1193 * Some consistency checks. | |
| 1194 */ | |
| 1195 #if defined(CYGFUN_KERNEL_THREADS_TIMER) && !defined(CYGVAR_KERNEL_COUNTERS_CLOCK) | |
| 1196 # error "Cannot have Thread Timers without Real Time Clock" | |
| 1197 #endif | |
| 1198 | |
| 1199 #if defined(CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT) && !defined(CYGVAR_KERNEL_THREADS_LIST) | |
| 1200 # error "GDB thread support requires a list of all known threads." | |
| 1201 #endif | |
| 1202 | |
| 1203 /* --------------------------------------------------------------------- | |
| 1204 * Synchronization primitives miscellania. | |
| 1205 * | |
| 1206 * These lines should not be edited by users. | |
| 1207 */ | |
| 1208 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE | |
| 1209 # define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE | |
| 1210 #endif | |
| 1211 #if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE) && !defined(CYGSEM_KERNEL_SCHED_MLQUEUE) | |
| 1212 # error "Priority inheritance can only be enabled if the mlqueue scheduler is used." | |
| 1213 #endif | |
| 1214 | |
| 1215 /* --------------------------------------------------------------------- | |
| 1216 * This code allows the kernel build to be configured as a GDB | |
| 1217 * stub ROM monitor. It is only intended for internal use. | |
| 1218 */ | |
| 1219 | |
| 1220 /* | |
| 1221 * BLV: This code must be kept commented out for now, as it can | |
| 1222 * confuse the configuration tool. The correct solution is to have a | |
| 1223 * standard configuration for the system as represented by e.g. a | |
| 1224 * .ptest file which does the right thing. A ROM monitor is an | |
| 1225 * application, and application-specific configuration stuff should | |
| 1226 * not live in the master header file. | |
| 1227 */ | |
| 1228 | |
| 1229 /* | |
| 1230 #undef CYG_HAL_ROM_MONITOR | |
| 1231 | |
| 1232 #ifdef CYG_HAL_ROM_MONITOR | |
| 1233 | |
| 1234 #undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT | |
| 1235 #undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT | |
| 1236 #undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK | |
| 1237 #undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING | |
| 1238 #undef CYGIMP_KERNEL_INTERRUPTS_CHAIN | |
| 1239 #undef CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 1240 #undef CYGFUN_KERNEL_THREADS_TIMER | |
| 1241 #undef CYGPKG_KERNEL_EXCEPTIONS | |
| 2 | 1242 #undef CYGSEM_KERNEL_SCHED_TIMESLICE |
| 0 | 1243 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE |
| 1244 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE | |
| 1245 #undef CYGPKG_KERNEL_INSTRUMENT | |
| 1246 #undef CYGDBG_INFRA_DIAG_USE_DEVICE // now lives in infra | |
| 1247 | |
| 2 | 1248 #define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
| 0 | 1249 |
| 1250 #endif | |
| 1251 */ | |
| 1252 | |
| 1253 /* -------------------------------------------------------------------*/ | |
| 1254 | |
| 1255 #endif /* ifdef CYGPKG_KERNEL */ | |
| 1256 | |
| 1257 /* -------------------------------------------------------------------*/ | |
| 1258 #endif /* CYGONCE_PKGCONF_KERNEL_H */ | |
| 1259 /* EOF kernel.h */ |
