📄 kernel.h
字号:
Some schedulers including the mlqueue scheduler support timeslicing. This means that the kernel will check regularly whether or not there is another runnable thread with the same priority, and if there is such a thread there will be an automatic context switch. Not all applications require timeslicing, for example because every thread performs a blocking operation regularly. For these applications it is possible to disable timeslicing, which reduces the overheads associated with timer interrupts." } cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS { display "Number of clock ticks between timeslices" parent CYGPKG_KERNEL_SCHED type count legal_values 1 to 65535 #active_if CYGSEM_KERNEL_SCHED_TIMESLICE description " Assuming timeslicing is enabled, how frequently should it take place? The value of this option corresponds to the number of clock ticks that should occur before a timeslice takes place, so increasing the value reduces the frequency of timeslices." } }}CFG_DATA */#define CYGSEM_KERNEL_SCHED_MLQUEUE#undef CYGSEM_KERNEL_SCHED_BITMAP#undef CYGSEM_KERNEL_SCHED_LOTTERY#define CYGNUM_KERNEL_SCHED_PRIORITIES 32#define CYGSEM_KERNEL_SCHED_TIMESLICE#define CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS 5/* --------------------------------------------------------------------- * Counters and clocks. {{CFG_DATA cdl_component CYGPKG_KERNEL_COUNTERS { display "Counters and clocks" parent CYGPKG_KERNEL type dummy description " The counter objects provided by the kernel provide an abstraction of the clock facility that is generally provided. Application code can associate alarms with counters, where an alarm is identified by the number of ticks until it triggers, the action to be taken on triggering, and whether or not the alarm should be repeated." doc ref/ecos-ref/counters-clocks-and-alarms.html } cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK { display "Provide real-time clock" parent CYGPKG_KERNEL_COUNTERS requires CYGIMP_KERNEL_INTERRUPTS_DSRS description " On all current target systems the kernel can provide a real-time clock. This clock serves two purposes. First it is necessary to support clock and alarm related functions. Second it is needed to implement timeslicing in some of the schedulers including the mlqueue scheduler. If the application does not require any of these facilities then it is possible to disable the real time clock support completely." doc ref/ecos-ref/counters-clocks-and-alarms.html } cdl_component CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE { display "Override default clock settings" parent CYGPKG_KERNEL_COUNTERS requires CYGVAR_KERNEL_COUNTERS_CLOCK type bool description " The kernel has default settings for the clock interrupt frequency. These settings will vary from platform to platform, but typically there will be a 100 clock interrupts every second. It is possible to change this frequency, but it requires some knowledge of the target hardware. " } cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD { display "Clock hardware initialization value" parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE type count legal_values 1 to 0x7fffffff description " During system initialization this value is used to initialize the clock hardware. The exact meaning of the value and the range of legal values therefore depends on the target hardware, and the hardware documentation should be consulted for further details. In addition the clock resolution numerator and denominator values should be updated. Typical values for this option would be 150000 on the MN10300 stdeval1 board, 15625 on the tx39 jmr3904 board, and 20833 on the powerpc cogent board." } cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR { display "Clock resolution numerator" parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE type count legal_values 1 to 0x7fffffff description " If a non-default clock interrupt frequency is used then it is necessary to specify the clock resolution explicitly. This resolution involves two separate values, the numerator and the denominator. The result of dividing the numerator by the denominator should correspond to the number of nanoseconds between clock interrupts. For example a numerator of 1000000000 and a denominator of 100 means that there are 10000000 nanoseconds (or 10 milliseconds) between clock interrupts. Expressing the resolution as a fraction should minimize clock drift even for frequencies that cannot be expressed as a simple integer. For example a frequency of 60Hz corresponds to a clock resolution of 16666666.66... nanoseconds. This can be expressed accurately as 1000000000 over 60." } cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR { display "Clock resolution denominator" parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE type count legal_values 1 to 0x7fffffff description " If a non-default clock interrupt frequency is used then it is necessary to specify the clock resolution explicitly. This resolution involves two separate values, the numerator and the denominator. The result of dividing the numerator by the denominator should correspond to the number of nanoseconds between clock interrupts. For example a numerator of 1000000000 and a denominator of 100 means that there are 10000000 nanoseconds (or 10 milliseconds) between clock interrupts. Expressing the resolution as a fraction should minimize clock drift even for frequencies that cannot be expressed as a simple integer. For example a frequency of 60Hz corresponds to a clock resolution of 16666666.66... nanoseconds. This can be expressed accurately as 1000000000 over 60." } # NOTE: these option should really be a single enum. cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST { display "Implement counters using a single list" parent CYGPKG_KERNEL_COUNTERS type radio description " There are two different implementations of the counter objects. The first implementation stores all alarms in a single linked list. The alternative implementation uses a table of linked lists. A single list is more efficient in terms of memory usage and is generally adequate when the application only makes use of a small number of alarms." doc ref/ecos-ref/counters-clocks-and-alarms.html } cdl_option CYGIMP_KERNEL_COUNTERS_MULTI_LIST { display "Implement counters using a table of lists" parent CYGPKG_KERNEL_COUNTERS type radio description " There are two different implementations of the counter objects. The first implementation stores all alarms in a single linked list. The alternative implementation uses a table of linked lists, with the size of the table being a separate configurable option. For more complicated operations it is better to have a table of lists since this reduces the amount of computation whenever the timer goes off. Assuming a table size of 8 (the default value) on average the timer code will only need to check 1/8 of the pending alarms instead of all of them." doc ref/ecos-ref/counters-clocks-and-alarms.html } cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE { display "Size of counter list table" parent CYGPKG_KERNEL_COUNTERS type count legal_values 1 to 1024 #active_if CYGIMP_KERNEL_COUNTERS_MULTI_LIST description " If counters are implemented using an array of linked lists then this option controls the size of the array. A larger size reduces the amount of computation that needs to take place whenever the timer goes off, but requires extra memory." doc ref/ecos-ref/counters-clocks-and-alarms.html } cdl_option CYGIMP_KERNEL_COUNTERS_SORT_LIST { display "Sort the counter list" parent CYGPKG_KERNEL_COUNTERS type bool description " Sorting the counter lists reduces the amount of work that has to be done when a counter tick is processed, since the next alarm to expire is always at the front of the list. However, it makes adding an alarm to the list more expensive since a search must be done for the correct place to put it. Many alarms are used to implement timeouts, which seldom trigger, so it is worthwhile optimizing this case. For this reason sorted list are disabled by default." } cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY { display "Measure real-time [clock] interrupt latency" parent CYGPKG_KERNEL_COUNTERS requires CYGVAR_KERNEL_COUNTERS_CLOCK description " Measure the interrupt latency as seen by the real-time clock timer interrupt. This requires hardware support, defined by the HAL_CLOCK_LATENCY() macro." doc ref/ecos-ref/counters-clocks-and-alarms.html } }}CFG_DATA */#define CYGVAR_KERNEL_COUNTERS_CLOCK#undef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE#define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD 9999#define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR 1000000000#define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR 100#define CYGIMP_KERNEL_COUNTERS_SINGLE_LIST#undef CYGIMP_KERNEL_COUNTERS_MULTI_LIST#define CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE 8#undef CYGIMP_KERNEL_COUNTERS_SORT_LIST#undef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY/* --------------------------------------------------------------------- * Thread-related options {{CFG_DATA cdl_component CYGPKG_KERNEL_THREADS { display "Thread-related options" type dummy parent CYGPKG_KERNEL description " There are a number of configuration options related to the implementation of threads, for example whether or not the eCos kernel supports per-thread data." doc ref/ecos-ref/thread-operations.html } cdl_option CYGFUN_KERNEL_THREADS_TIMER { display "Allow per-thread timers" parent CYGPKG_KERNEL_THREADS requires CYGVAR_KERNEL_COUNTERS_CLOCK description " This option controls whether or not the kernel should support per-thread clock and alarm related functions. Also some of the synchronization primitives such as semaphore and condition variable timed wait operations require per-thread timer support. If none of these facilities are required then the option can be disabled." doc ref/ecos-ref/thread-operations.html } cdl_option CYGVAR_KERNEL_THREADS_NAME { display "Support optional name for each thread" parent CYGPKG_KERNEL_THREADS description " Threads may optionally be supplied with a name string that is used to identify them during debugging. This name is only present if `this option is defined. Disabling it reduces both code and data size." doc ref/ecos-ref/thread-operations.html } cdl_option CYGVAR_KERNEL_THREADS_LIST { display "Keep track of all threads using a linked list" parent CYGPKG_KERNEL_THREADS description " Threads may optionally be placed on a housekeeping list so that all threads may be located easily. This is useful mainly in conjunction with source-level debugging." doc ref/ecos-ref/thread-operations.html } cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT { display "Keep track of the base of each thread's stack" parent CYGPKG_KERNEL_THREADS description " This option makes the kernel keep track of the lower limit on each thread's stack. It allows the kernel to adjust the lower limit, thus making space for per-thread data. Note that it does not imply any form of run-time stack overflow checking." doc ref/ecos-ref/thread-operations.html } cdl_option CYGVAR_KERNEL_THREADS_DATA { display "Support for per-thread data" parent CYGPKG_KERNEL_THREADS requires CYGFUN_KERNEL_THREADS_STACK_LIMIT description " It is possible for the kernel to support per-thread data, in other words an area of memory specific to each thread which can be used to store data for that thread. This per-thread data can be used by applications or by other packages such as the ISO C library." doc ref/ecos-ref/thread-operations.html } cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX { display "Number of words of per-thread data" parent CYGPKG_KERNEL_THREADS #active_if CYGVAR_KERNEL_THREADS_DATA type count legal_values 1 to 65535 description " It is possible for the kernel to support per-thread data, in other words an area of memory specific to each thread which can be used to store data for that thread. This per-thread data can be used by applications or by other packages such as the ISO C library. This configuration option controls the number of words of per-thread data that the kernel will allow." doc ref/ecos-ref/thread-operations.html
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -