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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      scheduler.cdl
4
#
5
#      configuration data related to the kernel schedulers
6
#
7
# ====================================================================
8
#####ECOSGPLCOPYRIGHTBEGIN####
9
## -------------------------------------------
10
## This file is part of eCos, the Embedded Configurable Operating System.
11
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12
##
13
## eCos is free software; you can redistribute it and/or modify it under
14
## the terms of the GNU General Public License as published by the Free
15
## Software Foundation; either version 2 or (at your option) any later version.
16
##
17
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
## for more details.
21
##
22
## You should have received a copy of the GNU General Public License along
23
## with eCos; if not, write to the Free Software Foundation, Inc.,
24
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25
##
26
## As a special exception, if other files instantiate templates or use macros
27
## or inline functions from this file, or you compile this file and link it
28
## with other works to produce a work based on this file, this file does not
29
## by itself cause the resulting work to be covered by the GNU General Public
30
## License. However the source code for this file must still be made available
31
## in accordance with section (3) of the GNU General Public License.
32
##
33
## This exception does not invalidate any other reasons why a work based on
34
## this file might be covered by the GNU General Public License.
35
##
36
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37
## at http://sources.redhat.com/ecos/ecos-license/
38
## -------------------------------------------
39
#####ECOSGPLCOPYRIGHTEND####
40
# ====================================================================
41
######DESCRIPTIONBEGIN####
42
#
43
# Author(s):      jskov
44
# Original data:  nickg
45
# Contributors:
46
# Date:           1999-07-05
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
 
52
cdl_interface CYGINT_KERNEL_SCHEDULER {
53
    display  "Number of schedulers in this configuration"
54
    no_define
55
    requires 1 == CYGINT_KERNEL_SCHEDULER
56
}
57
 
58
cdl_interface CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES {
59
    display  "Non-zero if the active schedule only has unique priorities"
60
    description "
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."
64
}
65
 
66
# FIXME: The two below options must be mutually exclusive
67
cdl_component CYGSEM_KERNEL_SCHED_MLQUEUE {
68
    display       "Multi-level queue scheduler"
69
    default_value 1
70
    implements    CYGINT_KERNEL_SCHEDULER
71
    description   "
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."
77
 
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
83
        default_value 0
84
        description   "
85
                When tracing is enabled, output trace messages every
86
                timeslice. This can be quite verbose so is disabled by
87
                default."
88
    }
89
}
90
 
91
cdl_option CYGSEM_KERNEL_SCHED_BITMAP {
92
    display       "Bitmap scheduler"
93
    default_value 0
94
    implements    CYGINT_KERNEL_SCHEDULER
95
    implements    CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
96
    requires      !CYGPKG_KERNEL_SMP_SUPPORT
97
    description   "
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
104
        priority level."
105
}
106
 
107
#cdl_option CYGSEM_KERNEL_SCHED_LOTTERY {
108
#    display      "Lottery scheduler"
109
#    type          radio
110
#    description "
111
#       This scheduler is not yet available."
112
#}
113
 
114
cdl_option CYGPRI_KERNEL_SCHED_IMPL_HXX {
115
    display       "Scheduler header file"
116
    flavor        data
117
    description   "
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."
121
    calculated { \
122
               CYGSEM_KERNEL_SCHED_BITMAP  ? ""  :\
123
               CYGSEM_KERNEL_SCHED_MLQUEUE ? "" :\
124
               CYGSEM_KERNEL_SCHED_LOTTERY ? "" :\
125
               "!!!-- Configuration broken - no scheduler selected --!!!"}
126
}
127
 
128
 
129
 
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"
134
    flavor        data
135
    legal_values  1 to 32
136
    default_value 32
137
    #active_if     CYGINT_KERNEL_SCHED_PRIORITY_SCHEDULER
138
    description "
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."
147
 
148
    cdl_option CYGNUM_KERNEL_SCHED_BITMAP_SIZE {
149
        display       "Bitmap size"
150
        flavor        data
151
        calculated    {"CYGNUM_KERNEL_SCHED_PRIORITIES"}
152
        description   "
153
                This option automatically defines the size of bitmap
154
                used to track occupied priority levels."
155
    }
156
 
157
 
158
    cdl_option CYGIMP_KERNEL_SCHED_SORTED_QUEUES {
159
        display       "Dequeue oldest threads first"
160
        flavor        bool
161
        default_value 0
162
        description   "
163
            With this option enabled, threads queued in a thread queue
164
            will be dequeued in priority order, rather than last in,
165
            first out (LIFO). 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
169
            less deterministic."
170
    }
171
}
172
 
173
# ---------------------------------------------------------------------
174
# Timeslice options
175
 
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
182
    default_value 1
183
    description "
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."
193
 
194
    cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS {
195
        display       "Number of clock ticks between timeslices"
196
        flavor        data
197
        legal_values  1 to 65535
198
        default_value 5
199
        description "
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
204
            of timeslices."
205
    }
206
 
207
    cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE {
208
        display       "Support runtime enable of timeslice per-thread"
209
        flavor        bool
210
        default_value false
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."
216
 
217
    }
218
}
219
 
220
# ---------------------------------------------------------------------
221
# ASR support options
222
 
223
cdl_component CYGSEM_KERNEL_SCHED_ASR_SUPPORT {
224
    display       "Enable ASR support"
225
    flavor        bool
226
    default_value false
227
    description   "
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."
232
 
233
    cdl_option CYGSEM_KERNEL_SCHED_ASR_GLOBAL {
234
        display       "Make ASR function global"
235
        flavor        bool
236
        default_value true
237
        description "
238
             This option controls whether the ASR function is shared by
239
             all threads, or whether each thread may have its own ASR
240
             function."
241
    }
242
 
243
    cdl_option CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL {
244
        display       "Make ASR data global"
245
        flavor        bool
246
        default_value true
247
        description "
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
252
             function."
253
    }
254
}
255
 
256
# EOF scheduler.cdl

powered by: WebSVN 2.1.0

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