1 # ====================================================================
5 # configuration data related to the kernel schedulers
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
44 # Original data: nickg
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_interface CYGINT_KERNEL_SCHEDULER {
53 display "Number of schedulers in this configuration"
55 requires 1 == CYGINT_KERNEL_SCHEDULER
58 cdl_interface CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES {
59 display "Non-zero if the active schedule only has unique priorities"
61 Not all schedulers allow mutiple threads to use the same
62 priority. That property is signalled via this option, allowing
63 scheduler and tests to behave accordingly."
66 # FIXME: The two below options must be mutually exclusive
67 cdl_component CYGSEM_KERNEL_SCHED_MLQUEUE {
68 display "Multi-level queue scheduler"
70 implements CYGINT_KERNEL_SCHEDULER
72 The multi-level queue scheduler supports multiple priority
73 levels and multiple threads at each priority level.
74 Preemption between priority levels is automatic. Timeslicing
75 within a given priority level is controlled by a separate
76 configuration option."
78 cdl_option CYGDBG_KERNEL_TRACE_TIMESLICE {
79 display "Output timeslices when tracing"
80 active_if CYGDBG_USE_TRACING
81 requires !CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE
82 requires !CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY
85 When tracing is enabled, output trace messages every
86 timeslice. This can be quite verbose so is disabled by
91 cdl_option CYGSEM_KERNEL_SCHED_BITMAP {
92 display "Bitmap scheduler"
94 implements CYGINT_KERNEL_SCHEDULER
95 implements CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
96 requires !CYGPKG_KERNEL_SMP_SUPPORT
98 The bitmap scheduler supports multiple priority levels but
99 only one thread can exist at each priority level. This means
100 that scheduling decisions are very simple and hence the
101 scheduler is efficient. Preemption between priority levels is
102 automatic. Timeslicing within a given priority level is
103 irrelevant since there can be only one thread at each
107 #cdl_option CYGSEM_KERNEL_SCHED_LOTTERY {
108 # display "Lottery scheduler"
111 # This scheduler is not yet available."
114 cdl_option CYGPRI_KERNEL_SCHED_IMPL_HXX {
115 display "Scheduler header file"
118 This option sets a preprocessor symbol which names the header
119 file for the selected scheduler. It is used internally by the
120 common scheduler code to include the correct header file."
122 CYGSEM_KERNEL_SCHED_BITMAP ? "<cyg/kernel/bitmap.hxx>" :\
123 CYGSEM_KERNEL_SCHED_MLQUEUE ? "<cyg/kernel/mlqueue.hxx>" :\
124 CYGSEM_KERNEL_SCHED_LOTTERY ? "<cyg/kernel/lottery.hxx>" :\
125 "!!!-- Configuration broken - no scheduler selected --!!!"}
130 # NOTE: This option only makes sense if the current scheduler
131 # supports multiple priority levels.
132 cdl_component CYGNUM_KERNEL_SCHED_PRIORITIES {
133 display "Number of priority levels"
137 #active_if CYGINT_KERNEL_SCHED_PRIORITY_SCHEDULER
139 This option controls the number of priority levels that are
140 available. For some types of scheduler including the bitmap
141 scheduler this may impose an upper bound on the number of
142 threads in the system. For other schedulers such as the
143 mlqueue scheduler the number of threads is independent from
144 the number of priority levels. Note that the lowest priority
145 level is normally used only by the idle thread, although
146 application threads can run at this priority if necessary."
148 cdl_option CYGNUM_KERNEL_SCHED_BITMAP_SIZE {
149 display "Bitmap size"
151 calculated {"CYGNUM_KERNEL_SCHED_PRIORITIES"}
153 This option automatically defines the size of bitmap
154 used to track occupied priority levels."
158 cdl_option CYGIMP_KERNEL_SCHED_SORTED_QUEUES {
159 display "Dequeue highest priority threads first"
163 With this option enabled, threads queued in a thread queue
164 will be dequeued in priority order, rather than first in,
165 first out (FIFO). Threads of equal priority are dequeued
166 oldest first. The only exception is the scheduler run
167 queues where order is less important as each is already
168 sorted by priority. Note that this makes the thread queueing
173 # ---------------------------------------------------------------------
176 # NOTE: this option only makes sense for some of the schedulers.
177 # Timeslicing is irrelevant for bitmap schedulers.
178 cdl_component CYGSEM_KERNEL_SCHED_TIMESLICE {
179 display "Scheduler timeslicing"
180 requires !CYGSEM_KERNEL_SCHED_BITMAP
181 requires CYGVAR_KERNEL_COUNTERS_CLOCK
184 Some schedulers including the mlqueue scheduler support
185 timeslicing. This means that the kernel will check regularly
186 whether or not there is another runnable thread with the
187 same priority, and if there is such a thread there will be
188 an automatic context switch. Not all applications require
189 timeslicing, for example because every thread performs a
190 blocking operation regularly. For these applications it is
191 possible to disable timeslicing, which reduces the overheads
192 associated with timer interrupts."
194 cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS {
195 display "Number of clock ticks between timeslices"
197 legal_values 1 to 65535
200 Assuming timeslicing is enabled, how frequently should it
201 take place? The value of this option corresponds to the
202 number of clock ticks that should occur before a timeslice
203 takes place, so increasing the value reduces the frequency
207 cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE {
208 display "Support runtime enable of timeslice per-thread"
211 description "This option makes timslicing a per-thread runtime
212 option. When enabled, threads may have timeslicing
213 turned on or off dynamically. This is generally used
214 by higher level APIs (such as POSIX) to implement
215 differing scheduling policies."
220 # ---------------------------------------------------------------------
221 # ASR support options
223 cdl_component CYGSEM_KERNEL_SCHED_ASR_SUPPORT {
224 display "Enable ASR support"
228 This component controls support for Asynchronous Service
229 Routines (ASRs). This is a function that may be called
230 from the scheduler when it has just exited the scheduler
231 lock. This is primarily for use by API compatibility layers."
233 cdl_option CYGSEM_KERNEL_SCHED_ASR_GLOBAL {
234 display "Make ASR function global"
238 This option controls whether the ASR function is shared by
239 all threads, or whether each thread may have its own ASR
243 cdl_option CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL {
244 display "Make ASR data global"
248 This option controls whether the ASR data is shared by
249 all threads, or whether each thread may have its own ASR
250 data. This is independent of the previous option because
251 it may be useful to pass per-thread data to a shared ASR