Mercurial > flash_v2
annotate packages/compat/uitron/current/include/pkgconf/uitron.h @ 64:c38311975d4f ecos-sw-2000-01-28
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
| author | jlarmour |
|---|---|
| date | Fri, 28 Jan 2000 04:59:39 +0000 |
| parents | 29bc183297e1 |
| children | bf00f99aec69 |
| rev | line source |
|---|---|
| 0 | 1 #ifndef CYGONCE_PKGCONF_UITRON_H |
| 2 #define CYGONCE_PKGCONF_UITRON_H | |
| 3 //=========================================================================== | |
| 4 // | |
| 5 // pkgconf/uitron.h | |
| 6 // | |
| 7 // uITRON configuration file | |
| 8 // | |
| 9 //=========================================================================== | |
| 10 //####COPYRIGHTBEGIN#### | |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
11 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
12 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
13 // The contents of this file are subject to the Red Hat eCos Public License |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
14 // Version 1.0 (the "License"); you may not use this file except in |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
15 // compliance with the License. You may obtain a copy of the License at |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
16 // http://sourceware.cygnus.com/ecos |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
17 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
18 // Software distributed under the License is distributed on an |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
20 // License for the specific language governing rights and limitations under |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
21 // the License. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
22 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
23 // The Original Code is eCos - Embedded Configurable Operating System, |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
24 // released September 30, 1998. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
25 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
26 // The Initial Developer of the Original Code is Red Hat. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
27 // Portions created by Red Hat are |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
28 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
29 // All Rights Reserved. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
30 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
31 // |
| 0 | 32 //####COPYRIGHTEND#### |
| 33 //=========================================================================== | |
| 34 //#####DESCRIPTIONBEGIN#### | |
| 35 // | |
| 36 // Author(s): hmt | |
| 37 // Contributors: hmt | |
| 38 // Date: 1998-03-16 | |
| 39 // Purpose: uITRON configuration file | |
| 40 // Description: | |
| 41 // | |
| 42 //####DESCRIPTIONEND#### | |
| 43 // | |
| 44 //=========================================================================== | |
| 45 | |
| 46 // The layout of the uITRON Compatibility layer source code is documented in | |
| 47 // .../<REPOSITORY>/compat/uitron/<VERSION>/include/uit_func.h | |
| 48 | |
| 49 | |
| 50 // First get external global configuration in force: | |
| 51 #include <pkgconf/kernel.h> | |
| 52 | |
| 53 // The basic question: is the uITRON package provided at all? | |
| 54 | |
| 55 #ifdef CYGPKG_UITRON | |
| 56 | |
| 57 /* --------------------------------------------------------------------- | |
| 58 * Define an overall package for the UITRON Compatibility layer. Then | |
| 59 * create additional packages for the various different UITRON's currently | |
| 60 * available. | |
| 61 * | |
| 62 * Thought: Can we get a real 'mu' out of this in uITRON throughout? | |
| 63 * It's \265 in C strings, in iso_8859_1 | |
| 64 * | |
| 65 * | |
| 66 * {{CFG_DATA | |
| 67 cdl_package CYGPKG_UITRON { | |
| 2 | 68 display "eCos uITRON compatibility layer" |
| 0 | 69 type boolean |
| 70 requires CYGPKG_KERNEL | |
| 71 description "eCos supports a uITRON Compatibility Layer, providing | |
| 72 full Level S (Standard) compliance with Version 3.02 of | |
| 73 the uITRON Standard, plus many Level E (Extended) features. | |
| 74 uITRON is the premier Japanese embedded RTOS standard." | |
| 75 doc ref/ecos-ref/micro-itron-api.html | |
| 76 } | |
| 77 | |
| 78 }}CFG_DATA */ | |
| 79 | |
| 80 // ------------------------------------------------------------------------ | |
| 81 // Conformance check | |
| 82 // ------------------------------------------------------------------------ | |
| 83 /* {{CFG_DATA | |
| 84 cdl_option CYGIMP_UITRON_STRICT_CONFORMANCE { | |
| 2 | 85 display "Check strict uITRON standards conformance" |
| 0 | 86 parent CYGPKG_UITRON |
| 87 type radio | |
| 88 description "Require the rest of the system configuration | |
| 89 to match the needs of strict uITRON standards conformance. | |
| 90 This option can only be set if the rest of the system is | |
| 91 configured correctly for uITRON semantics, for example | |
| 92 there must be a realtime clock, a suitable scheduler, and no | |
| 93 timeslicing. | |
| 94 Of course a system without this selected can be completely | |
| 95 conformant; this is here to help you check." | |
| 96 doc ref/ecos-ref/micro-itron-api.html | |
| 97 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 98 requires CYGSEM_KERNEL_SCHED_MLQUEUE | |
| 99 requires !CYGSEM_KERNEL_SCHED_TIMESLICE | |
| 100 requires CYGFUN_KERNEL_THREADS_TIMER | |
| 101 } | |
| 102 cdl_option CYGIMP_UITRON_LOOSE_CONFORMANCE { | |
| 103 display "System configuration overrides uITRON" | |
| 104 parent CYGPKG_UITRON | |
| 105 type radio | |
| 106 description "Do not require the rest of the system configuration | |
| 107 to match the needs of strict uITRON standards conformance. | |
| 108 For example a bitmap scheduler, or timeslicing, can be used | |
| 109 with the uITRON functions, but such an environment is not | |
| 110 strictly conformant with the uITRON specification. | |
| 111 Of course a system with this selected can be completely | |
| 112 conformant; but it is up to you to configure it correctly." | |
| 113 doc ref/ecos-ref/micro-itron-api.html | |
| 114 } | |
| 115 }}CFG_DATA */ | |
| 116 #undef CYGIMP_UITRON_STRICT_CONFORMANCE | |
| 117 #define CYGIMP_UITRON_LOOSE_CONFORMANCE | |
| 118 | |
| 119 // ------------------------------------------------------------------------ | |
| 120 // uITRON FUNCTION CALLS | |
| 121 // ------------------------------------------------------------------------ | |
| 122 | |
| 123 // If compiling with a C++ compiler, uITRON functions can be inline: | |
| 124 // define this to make it so. | |
| 125 | |
| 126 /* {{CFG_DATA | |
| 127 cdl_option CYGIMP_UITRON_INLINE_FUNCS { | |
| 2 | 128 display "Inline functions" |
| 0 | 129 parent CYGPKG_UITRON |
| 130 type boolean | |
| 131 description "If compiling your application with a C++ compiler, | |
| 132 uITRON functions can be inline: set this to make it so. | |
| 133 Inlining functions often increases execution speed, | |
| 134 though possibly at the cost of a larger executable, | |
| 135 depending on what functions are used. | |
| 136 Do NOT set this if compiling your application | |
| 137 in plain C." | |
| 138 doc ref/ecos-ref/micro-itron-api.html | |
| 139 } | |
| 140 }}CFG_DATA */ | |
| 141 #undef CYGIMP_UITRON_INLINE_FUNCS | |
| 142 | |
| 143 // If not using inline functions, then uITRON functions are out-of-line; by | |
| 144 // default they have plain 'C' linkage ie. their names are extern 'C' in | |
| 145 // the C++ world and unadorned in the C world. To give them C++ names (NOT | |
| 146 // useable by plain 'C' programs), define this: | |
| 147 | |
| 148 /* {{CFG_DATA | |
| 149 cdl_option CYGIMP_UITRON_CPP_OUTLINE_FUNCS { | |
| 2 | 150 display "C++ function names" |
| 0 | 151 parent CYGPKG_UITRON |
| 152 type boolean | |
| 153 description "If compiling your application with a C++ compiler, | |
| 154 uITRON functions can be given C++ style mangled names: | |
| 155 set this to make it so. | |
| 156 This option may make debugging your program easier, | |
| 157 depending on your development environment. | |
| 158 Do NOT set this if compiling your application | |
| 159 in plain C." | |
| 160 doc ref/ecos-ref/micro-itron-api.html | |
| 161 } | |
| 162 }}CFG_DATA */ | |
| 163 #undef CYGIMP_UITRON_CPP_OUTLINE_FUNCS | |
| 164 | |
| 165 // When an application is fully debugged it might be useful to remove the | |
| 166 // code which checks parameters in the uITRON function calls. To use | |
| 167 // asserts [CYG_ASSERT()] instead - which are compiled to nothing in | |
| 168 // release flavored builds - define this: | |
| 169 | |
| 170 /* {{CFG_DATA | |
| 171 cdl_option CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS { | |
| 2 | 172 display "Return error codes for bad params" |
| 0 | 173 parent CYGPKG_UITRON |
| 174 type boolean | |
| 175 description "When an application is fully debugged there is no need | |
| 176 to check for bad parameters on every system call, for those | |
| 177 parameters which are typically pointers or constants. | |
| 178 Removing the checking code saves space | |
| 179 and improves performance: set this to make it so. | |
| 180 When this option is set, the correctness of parameters | |
| 181 is asserted using CYG_ASSERT() which compiles to | |
| 182 nothing in a non-debug configuration." | |
| 183 doc ref/ecos-ref/micro-itron-api.html | |
| 184 } | |
| 185 }}CFG_DATA */ | |
| 186 #define CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS | |
| 187 | |
| 188 // By default both C's NULL and uITRON's NADR are treated as bad addresses; | |
| 189 // but some controllers might have memory at address zero, and want to use | |
| 190 // it. In that case, prevent NULL being bounced by enabling this: | |
| 191 | |
| 192 /* {{CFG_DATA | |
| 193 cdl_option CYGSEM_UITRON_PARAMS_NULL_IS_GOOD_PTR { | |
| 194 display "NULL is a good pointer" | |
| 195 parent CYGPKG_UITRON | |
| 196 type boolean | |
| 197 description "uITRON deliberately defines the constant NADR (-1) for | |
| 198 use as an invalid memory address. | |
| 199 The value -1 is chosen to allow working in microcontrollers | |
| 200 which have real memory at address zero, the traditional 'C' | |
| 201 NULL pointer. | |
| 202 By default, uITRON functions check for both NULL and NADR as | |
| 203 bad addresses: set this option to prevent checking for | |
| 204 NULL and allow pointers to address zero to be used." | |
| 205 doc ref/ecos-ref/micro-itron-api.html | |
| 206 } | |
| 207 }}CFG_DATA */ | |
| 208 #undef CYGSEM_UITRON_PARAMS_NULL_IS_GOOD_PTR | |
| 209 | |
| 210 | |
| 211 // ------------------------------------------------------------------------ | |
| 212 // uITRON KERNEL OBJECTS | |
| 213 // ------------------------------------------------------------------------ | |
| 214 // First, simple synchronisation objects without complex initialization: | |
| 215 // semaphores, message or mail boxes and flags. Declare how many of each | |
| 216 // will exist in the system. They will be statically created with default | |
| 217 // initialization, ready for use. Their IDs in the uITRON sense are from 1 | |
| 218 // to the value of the appropriate symbol below: | |
| 219 | |
| 220 /* {{CFG_DATA | |
| 221 cdl_component CYGPKG_UITRON_SEMAS { | |
| 222 display "Semaphores" | |
| 223 type boolean | |
| 224 parent CYGPKG_UITRON | |
| 225 description "uITRON Semaphore objects are used with functions | |
| 226 named xxx_sem(); they support traditional semaphore | |
| 227 semantics." | |
| 228 } | |
| 229 cdl_option CYGNUM_UITRON_SEMAS { | |
| 230 display "Number of semaphores" | |
| 231 parent CYGPKG_UITRON_SEMAS | |
| 232 type count | |
| 233 legal_values 1 to 65535 | |
| 234 description "The number of uITRON semaphores | |
| 235 present in the system. | |
| 236 Valid semaphore object IDs will range | |
| 237 from 1 to this value." | |
| 238 } | |
| 239 cdl_component CYGPKG_UITRON_SEMAS_CREATE_DELETE { | |
| 240 display "Support create and delete" | |
| 241 parent CYGPKG_UITRON_SEMAS | |
| 242 type boolean | |
| 243 description "Support | |
| 244 semaphore | |
| 245 create and delete operations | |
| 246 (cre_sem, del_sem). | |
| 247 Otherwise all semaphores are created, | |
| 248 up to the number specified above." | |
| 249 } | |
| 250 cdl_option CYGNUM_UITRON_SEMAS_INITIALLY { | |
| 251 display "Number of semaphores created initially" | |
| 252 parent CYGPKG_UITRON_SEMAS_CREATE_DELETE | |
| 253 type count | |
| 254 legal_values 0 to 65535 | |
| 255 description "The number of uITRON semaphores initially created. | |
| 256 This number should not be more than the number | |
| 257 of semaphores in the system, though setting it to a large | |
| 258 value to mean 'all' is acceptable. | |
| 259 Initially, only semaphores numbered 1 to this number exist; | |
| 260 higher numbered ones must be created before use. | |
| 261 It is only useful to initialize semaphores up to this number; | |
| 262 higher numbered ones must be created in order to use them, | |
| 263 and so they will be re-initialized." | |
| 264 | |
| 265 } | |
| 266 cdl_component CYGPKG_UITRON_SEMAS_ARE_INITIALIZED { | |
| 267 display "Initialize semaphore counts" | |
| 268 parent CYGPKG_UITRON_SEMAS | |
| 269 type boolean | |
| 270 description "Initialize semaphores to specific count values. | |
| 271 Otherwise semaphores are initialized with the count | |
| 272 set to zero." | |
| 273 } | |
| 274 cdl_option CYGDAT_UITRON_SEMA_INITIALIZERS { | |
| 275 display "Static initializers" | |
| 276 parent CYGPKG_UITRON_SEMAS_ARE_INITIALIZED | |
| 277 type multiline | |
| 278 description "A list of initializers separated by commas, | |
| 279 one per line. | |
| 280 An initializer is 'CYG_UIT_SEMA(INITIAL-COUNT)' | |
| 281 or 'CYG_UIT_SEMA_NOEXS' for slots above the number | |
| 282 initially to be created, when create and delete | |
| 283 operations are supported. | |
| 284 Note: this option is invoked in the context of a | |
| 285 C++ array initializer, between curly brackets. | |
| 286 Ensure that the number of initializers here exactly | |
| 287 matches the total number of semaphores specified." | |
| 288 } | |
| 289 }}CFG_DATA */ | |
| 290 | |
| 291 // Counting Semaphores: xxx_sem() ops in uITRON. | |
| 292 #define CYGPKG_UITRON_SEMAS | |
| 293 #define CYGNUM_UITRON_SEMAS 3 | |
| 294 #undef CYGPKG_UITRON_SEMAS_ARE_INITIALIZED | |
| 295 | |
| 296 // Optionally initialize in terms of CYG_UIT_SEMA( initial_count ): | |
| 297 #ifdef CYGPKG_UITRON_SEMAS | |
| 298 #ifdef CYGPKG_UITRON_SEMAS_ARE_INITIALIZED | |
| 299 #if 0 < CYGNUM_UITRON_SEMAS | |
| 300 #define CYGDAT_UITRON_SEMA_INITIALIZERS \ | |
| 2 | 301 CYG_UIT_SEMA( 0 ), \ |
| 0 | 302 CYG_UIT_SEMA( 0 ), \ |
| 2 | 303 CYG_UIT_SEMA( 0 ) |
| 0 | 304 #endif |
| 305 #endif // CYGPKG_UITRON_SEMAS_ARE_INITIALIZED | |
| 306 | |
| 307 #define CYGPKG_UITRON_SEMAS_CREATE_DELETE | |
| 308 | |
| 309 #ifdef CYGPKG_UITRON_SEMAS_CREATE_DELETE | |
| 310 #define CYGNUM_UITRON_SEMAS_INITIALLY 3 | |
| 311 #endif // CYGPKG_UITRON_SEMAS_CREATE_DELETE | |
| 312 | |
| 313 #endif // CYGPKG_UITRON_SEMAS | |
| 314 | |
| 315 /* {{CFG_DATA | |
| 316 cdl_component CYGPKG_UITRON_MBOXES { | |
| 317 display "Mailboxes" | |
| 318 type boolean | |
| 319 parent CYGPKG_UITRON | |
| 320 description "uITRON Mailbox objects are used with functions | |
| 321 named xxx_msg() and xxx_mbx(); they support | |
| 322 passing addresses (of 'messages') between tasks | |
| 323 in a safe manner." | |
| 324 } | |
| 325 cdl_option CYGNUM_UITRON_MBOXES { | |
| 326 display "Number of mailboxes" | |
| 327 parent CYGPKG_UITRON_MBOXES | |
| 328 type count | |
| 329 legal_values 1 to 65535 | |
| 330 description "The number of uITRON mailboxes | |
| 331 present in the system. | |
| 332 Valid mailbox object IDs will range | |
| 333 from 1 to this value." | |
| 334 } | |
| 335 cdl_component CYGPKG_UITRON_MBOXES_CREATE_DELETE { | |
| 336 display "Support create and delete" | |
| 337 parent CYGPKG_UITRON_MBOXES | |
| 338 type boolean | |
| 339 description "Support | |
| 340 mailbox | |
| 341 create and delete operations | |
| 342 (cre_mbx, del_mbx). | |
| 343 Otherwise all mailboxes are created, | |
| 344 up to the number specified above." | |
| 345 } | |
| 346 cdl_option CYGNUM_UITRON_MBOXES_INITIALLY { | |
| 347 display "Number of mailboxes created initially" | |
| 348 parent CYGPKG_UITRON_MBOXES_CREATE_DELETE | |
| 349 type count | |
| 350 legal_values 0 to 65535 | |
| 351 description "The number of uITRON mailboxes initially created. | |
| 352 This number should not be more than the number | |
| 353 of mailboxes in the system, though setting it to a large | |
| 354 value to mean 'all' is acceptable. | |
| 355 Initially, only mailboxes numbered 1 to this number exist; | |
| 356 higher numbered ones must be created before use." | |
| 357 } | |
| 358 }}CFG_DATA */ | |
| 359 | |
| 360 // Message Boxes: xxx_msg() ops in uITRON. | |
| 361 #define CYGPKG_UITRON_MBOXES | |
| 362 #define CYGNUM_UITRON_MBOXES 4 | |
| 363 | |
| 364 #ifdef CYGPKG_UITRON_MBOXES | |
| 365 | |
| 366 #define CYGPKG_UITRON_MBOXES_CREATE_DELETE | |
| 367 | |
| 368 #ifdef CYGPKG_UITRON_MBOXES_CREATE_DELETE | |
| 369 #define CYGNUM_UITRON_MBOXES_INITIALLY 4 | |
| 370 #endif // CYGPKG_UITRON_MBOXES_CREATE_DELETE | |
| 371 #endif // CYGPKG_UITRON_MBOXES | |
| 372 | |
| 373 /* {{CFG_DATA | |
| 374 cdl_component CYGPKG_UITRON_FLAGS { | |
| 375 display "Eventflags" | |
| 376 type boolean | |
| 377 parent CYGPKG_UITRON | |
| 378 description "uITRON Eventflag objects are used with functions | |
| 379 named xxx_flg(); they support communication between | |
| 380 tasks by means of setting and clearing bits in a word | |
| 381 or flag value. | |
| 382 Waiting for all or any of a set of bits is supported." | |
| 383 } | |
| 384 cdl_option CYGNUM_UITRON_FLAGS { | |
| 2 | 385 display "Number of eventflags" |
| 0 | 386 parent CYGPKG_UITRON_FLAGS |
| 387 type count | |
| 388 legal_values 1 to 65535 | |
| 389 description "The number of uITRON eventflag | |
| 390 objects present in the system. | |
| 391 Valid eventflag object IDs will range | |
| 392 from 1 to this value." | |
| 393 } | |
| 394 cdl_component CYGPKG_UITRON_FLAGS_CREATE_DELETE { | |
| 395 display "Support create and delete" | |
| 396 parent CYGPKG_UITRON_FLAGS | |
| 397 type boolean | |
| 398 description "Support | |
| 399 eventflag | |
| 400 create and delete operations | |
| 401 (cre_flg, del_flg). | |
| 402 Otherwise all eventflags are created, | |
| 403 up to the number specified above." | |
| 404 } | |
| 405 cdl_option CYGNUM_UITRON_FLAGS_INITIALLY { | |
| 406 display "Number of eventflags created initially" | |
| 407 parent CYGPKG_UITRON_FLAGS_CREATE_DELETE | |
| 408 type count | |
| 409 legal_values 0 to 65535 | |
| 410 description "The number of uITRON eventflags initially created. | |
| 411 This number should not be more than the number | |
| 412 of eventflags in the system, though setting it to a large | |
| 413 value to mean 'all' is acceptable. | |
| 414 Initially, only eventflags numbered 1 to this number exist; | |
| 415 higher numbered ones must be created before use." | |
| 416 } | |
| 417 }}CFG_DATA */ | |
| 418 | |
| 419 // Flags: xxx_flg ops in uITRON. | |
| 420 #define CYGPKG_UITRON_FLAGS | |
| 421 #define CYGNUM_UITRON_FLAGS 5 | |
| 422 | |
| 423 #ifdef CYGPKG_UITRON_FLAGS | |
| 424 | |
| 425 #define CYGPKG_UITRON_FLAGS_CREATE_DELETE | |
| 426 | |
| 427 #ifdef CYGPKG_UITRON_FLAGS_CREATE_DELETE | |
| 428 #define CYGNUM_UITRON_FLAGS_INITIALLY 5 | |
| 429 #endif // CYGPKG_UITRON_FLAGS_CREATE_DELETE | |
| 430 #endif // CYGPKG_UITRON_FLAGS | |
| 431 | |
| 432 // ------------------------------------------------------------------------ | |
| 433 // Next, uITRON tasks. These must be initialized, and the number of them | |
| 434 // must match the number of entries in the initializer definition. | |
| 435 // | |
| 436 // CYGNUM_UITRON_TASKS defines the number of tasks; they are numbered 1 | |
| 437 // through CYGNUM_UITRON_TASKS. | |
| 438 // | |
| 439 // CYGDAT_UITRON_TASK_EXTERNS is used to declare external symbols which are | |
| 440 // used in the initializations, typically the addresses of the functions who | |
| 441 // implement each of the tasks. Other objects might also be declared, for | |
| 442 // example stack data or scratch data which is used by the tasks. | |
| 443 // | |
| 444 // CYGDAT_UITRON_TASK_INITIALIZERS defines a list of CYG_UIT_TASK() | |
| 445 // initializers, separated by commas. The number of these defines how many | |
| 446 // uITRON tasks exist in the system. | |
| 447 // | |
| 448 // Both of these symbols must be defined. | |
| 449 // | |
| 450 // Task IDs in the uITRON sense are from 1 to the number of uITRON tasks | |
| 451 // which exist in the system, defined by CYGDAT_UITRON_TASK_INITIALIZERS. | |
| 452 // | |
| 453 // Tasks are dormant by default from the start; they must be resumed in | |
| 454 // order to run when the scheduler starts. Code to do this is provided in | |
| 455 // the uITRON package; it is present if this symbol is defined, and can be | |
| 456 // called from plain C code: | |
| 457 // CYGNUM_UITRON_START_TASKS > 0: start tasks 1..<value> | |
| 458 // CYGNUM_UITRON_START_TASKS = 0: start all uITRON tasks | |
| 459 // ie. 1..CYGNUM_UITRON_TASKS | |
| 460 // | |
| 461 // Alternatively, an expert programmer could start the uITRON tasks | |
| 462 // individually using the C++ system calls on the static array of tasks | |
| 463 // declared in uit_objs.hxx | |
| 464 | |
| 465 /* {{CFG_DATA | |
| 466 cdl_component CYGPKG_UITRON_TASKS { | |
| 467 display "Tasks" | |
| 468 type dummy | |
| 469 parent CYGPKG_UITRON | |
| 470 description "uITRON Tasks are the basic blocks of multi-tasking | |
| 471 in the uITRON world; they are threads or lightweight | |
| 472 processes, sharing the address space and the CPU. | |
| 473 They communicate using the primitives outlined above. | |
| 474 Each has a stack, an entry point (a C or C++ function), | |
| 475 and (where appropriate) a scheduling priority." | |
| 476 } | |
| 477 cdl_option CYGNUM_UITRON_TASKS { | |
| 478 display "Number of tasks" | |
| 479 parent CYGPKG_UITRON_TASKS | |
| 480 type count | |
| 481 legal_values 1 to 65535 | |
| 482 description "The number of uITRON tasks | |
| 483 present in the system. | |
| 484 Valid task object IDs will range | |
| 485 from 1 to this value." | |
| 486 } | |
| 487 cdl_option CYGNUM_UITRON_START_TASKS { | |
| 488 display "Start tasks" | |
| 489 parent CYGPKG_UITRON_TASKS | |
| 490 type count | |
| 491 legal_values 0 to 65535 | |
| 492 description "The number of uITRON tasks | |
| 493 to start automatically. | |
| 494 Tasks from 1 to this value will be started | |
| 495 at the beginning of application execution. | |
| 496 A value of zero here means to start them all. | |
| 497 Tasks started in this way have a start code of | |
| 498 zero, as if they were started by sta_tsk(i,0). | |
| 499 If create and delete operations are supported, | |
| 500 this number should be no greater than the number | |
| 501 of tasks created initially." | |
| 502 } | |
| 503 cdl_component CYGPKG_UITRON_TASKS_CREATE_DELETE { | |
| 504 display "Support create and delete" | |
| 505 parent CYGPKG_UITRON_TASKS | |
| 506 type boolean | |
| 507 description "Support | |
| 508 task | |
| 509 create and delete operations | |
| 510 (cre_tsk, del_tsk). | |
| 511 Otherwise all tasks are created, | |
| 512 up to the number specified above." | |
| 513 } | |
| 514 cdl_option CYGNUM_UITRON_TASKS_INITIALLY { | |
| 515 display "Number of tasks created initially" | |
| 516 parent CYGPKG_UITRON_TASKS_CREATE_DELETE | |
| 517 type count | |
| 518 legal_values 1 to 65535 | |
| 519 description "The number of uITRON tasks initially created. | |
| 520 This number should not be more than the number | |
| 521 of tasks in the system, though setting it to a large | |
| 522 value to mean 'all' is acceptable. | |
| 523 Initially, only tasks numbered 1 to this number exist; | |
| 524 higher numbered ones must be created before use." | |
| 525 } | |
| 526 cdl_option CYGNUM_UITRON_STACK_SIZE { | |
| 527 display "Default stack size" | |
| 528 parent CYGPKG_UITRON_TASKS | |
| 529 type count | |
| 530 legal_values 128 to 0x7FFFFFFF | |
| 531 description "Define a default stack size for uITRON tasks, | |
| 2 | 532 for use in the initialization options below. |
| 533 This will be overridden where it is used if the | |
| 534 architectural HAL requires a minimum stack size | |
| 535 to handle interrupts correctly." | |
| 0 | 536 } |
| 537 cdl_option CYGDAT_UITRON_TASK_EXTERNS { | |
| 538 display "Externs for initialization" | |
| 539 parent CYGPKG_UITRON_TASKS | |
| 540 type multiline | |
| 541 description "Task initializers may refer to external objects | |
| 542 such as memory for stack or functions to call. | |
| 543 Use this option to define or declare any external | |
| 544 objects needed by the task static initializer below. | |
| 545 Example: create some memory for a stack using | |
| 546 'static char stack1[CYGNUM_UITRON_STACK_SIZE];' | |
| 547 to set up a chunk of memory of the default stack size. | |
| 548 Note: this option is invoked in the 'outermost' context | |
| 549 of C++ source, where global/static objects are created; | |
| 550 it should contain valid, self-contained, C++ source." | |
| 551 } | |
| 552 cdl_option CYGDAT_UITRON_TASK_INITIALIZERS { | |
| 553 display "Static initializers" | |
| 554 parent CYGPKG_UITRON_TASKS | |
| 555 type multiline | |
| 556 description "Tasks must be statically | |
| 557 initialized: enter a list of initializers | |
| 558 separated by commas, one per line. | |
| 559 An initializer is | |
| 560 'CYG_UIT_TASK(NAME,PRIO,FUNC,STACK,SIZE)' | |
| 561 where name is a quoted string to name the task, | |
| 562 prio is the initial priority of the task, | |
| 563 func is the name of the entry point, | |
| 564 stack is the address of the task's stack, | |
| 565 and size is the size of the task's stack. | |
| 566 When create and delete operations are supported, | |
| 567 'CYG_UIT_TASK_NOEXS(NAME,STACK,SIZE)' should be | |
| 568 used for tasks which are not initially created, | |
| 569 in order to tell the system what memory to use | |
| 570 for stacks when these tasks are created later on. | |
| 571 Using 'CYGNUM_UITRON_STACK_SIZE' for size | |
| 572 is recommended, to use the option defined above, | |
| 573 so long as that truly is the size of your stack(s). | |
| 574 Note: this option is invoked in the context of a | |
| 575 C++ array initializer, between curly brackets. | |
| 576 Ensure that the number of initializers here exactly | |
| 577 matches the number of tasks specified." | |
| 578 } | |
| 579 }}CFG_DATA */ | |
| 580 | |
| 581 | |
| 582 // This default configuration has 4 tasks called task1, task2, task3 and | |
| 583 // task4, and only task1 is started up by cyg_uitron_start(). | |
| 584 | |
| 585 // first specify how many tasks we have | |
| 586 // no PKG define, tasks are not optional | |
| 587 #define CYGNUM_UITRON_TASKS 4 | |
| 588 | |
| 589 #define CYGNUM_UITRON_START_TASKS 1 // start task1 only | |
| 590 | |
| 591 #define CYGNUM_UITRON_STACK_SIZE 2048 | |
| 592 | |
| 593 #define CYGDAT_UITRON_TASK_EXTERNS \ | |
| 594 extern "C" void task1( unsigned int ); \ | |
| 595 extern "C" void task2( unsigned int ); \ | |
| 596 extern "C" void task3( unsigned int ); \ | |
| 597 extern "C" void task4( unsigned int ); \ | |
| 598 static char stack1[ CYGNUM_UITRON_STACK_SIZE ], \ | |
| 599 stack2[ CYGNUM_UITRON_STACK_SIZE ], \ | |
| 600 stack3[ CYGNUM_UITRON_STACK_SIZE ], \ | |
| 601 stack4[ CYGNUM_UITRON_STACK_SIZE ]; | |
| 602 | |
| 603 // then initialize in terms of | |
| 604 // CYG_UIT_TASK( "name", prio, func, stackaddress, stacksize ) | |
| 605 // [or CYG_UIT_TASK_NOEXS( "name", stackaddress, stacksize ) ] | |
| 606 // [for create/delete enabled, tasks which are not initially created. ] | |
| 607 #define CYGDAT_UITRON_TASK_INITIALIZERS \ | |
| 608 CYG_UIT_TASK( "t1", 1, task1, &stack1, CYGNUM_UITRON_STACK_SIZE ), \ | |
| 609 CYG_UIT_TASK( "t2", 2, task2, &stack2, CYGNUM_UITRON_STACK_SIZE ), \ | |
| 610 CYG_UIT_TASK( "t3", 3, task3, &stack3, CYGNUM_UITRON_STACK_SIZE ), \ | |
| 611 CYG_UIT_TASK( "t4", 4, task4, &stack4, CYGNUM_UITRON_STACK_SIZE ), \ | |
| 612 | |
| 613 // Do we support create and delete? | |
| 614 #define CYGPKG_UITRON_TASKS_CREATE_DELETE | |
| 615 | |
| 616 #ifdef CYGPKG_UITRON_TASKS_CREATE_DELETE | |
| 617 #define CYGNUM_UITRON_TASKS_INITIALLY 4 | |
| 618 #endif // CYGPKG_UITRON_TASKS_CREATE_DELETE | |
| 619 | |
| 620 // ------------------------------------------------------------------------ | |
| 621 // Memory Pools, both fixed and variable block: | |
| 622 // | |
| 623 // Any such object must be initialized, so the number of them defined must | |
| 624 // match the number of entries in the initializer much as for tasks. | |
| 625 | |
| 626 // Fixed block allocation memory pools: | |
| 627 | |
| 628 /* {{CFG_DATA | |
| 629 cdl_component CYGPKG_UITRON_MEMPOOLFIXED { | |
| 2 | 630 display "Fixed-size memorypools" |
| 0 | 631 type boolean |
| 632 parent CYGPKG_UITRON | |
| 633 description "uITRON supports memory pools for dynamic, task-safe | |
| 634 memory allocation. | |
| 635 Two kinds are supported, fixed-size and variable-size. | |
| 636 There may be multiple of each | |
| 637 type of pool, each with differing characteristics. | |
| 638 This option controls whether there are any fixed-size | |
| 639 memorypools in the system. | |
| 640 A fixed-size memorypool allocates blocks of memory of | |
| 641 its preset fixed size and none other." | |
| 642 } | |
| 643 cdl_option CYGNUM_UITRON_MEMPOOLFIXED { | |
| 2 | 644 display "Number of fixed-size memorypools" |
| 0 | 645 parent CYGPKG_UITRON_MEMPOOLFIXED |
| 646 type count | |
| 647 legal_values 1 to 65535 | |
| 648 description "The number of uITRON Fixed-Size | |
| 649 Memorypools present in the system. | |
| 650 Valid Fixed-Size Memorypool IDs will range | |
| 651 from 1 to this value." | |
| 652 } | |
| 653 cdl_component CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE { | |
| 654 display "Support create and delete" | |
| 655 parent CYGPKG_UITRON_MEMPOOLFIXED | |
| 656 type boolean | |
| 657 description "Support | |
| 658 fixed-size memory pool | |
| 659 create and delete operations | |
| 660 (cre_mpf, del_mpf). | |
| 661 Otherwise all fixed mempools are created, | |
| 662 up to the number specified above." | |
| 663 } | |
| 664 cdl_option CYGNUM_UITRON_MEMPOOLFIXED_INITIALLY { | |
| 665 display "Number of fixed mempools created initially" | |
| 666 parent CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE | |
| 667 type count | |
| 668 legal_values 0 to 65535 | |
| 669 description "The number of fixed mempools initially created. | |
| 670 This number should not be more than the number | |
| 671 of fixed mempools in the system, though setting | |
| 672 it to a large value to mean 'all' is acceptable. | |
| 673 Initially, only fixed mempools numbered from | |
| 674 1 to this number exist; | |
| 675 higher numbered ones must be created before use. | |
| 676 Whilst all mempools must be initialized to tell | |
| 677 the system what memory to use for each pool, | |
| 678 it is only useful to initialize the blocksize of | |
| 679 fixed mempools up to this number; | |
| 680 the blocksize for higher numbered ones | |
| 681 will be defined when they are created." | |
| 682 } | |
| 683 cdl_option CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS { | |
| 684 display "Externs for initialization" | |
| 685 parent CYGPKG_UITRON_MEMPOOLFIXED | |
| 686 type multiline | |
| 687 description "Fixed mempool initializers may refer to external | |
| 688 objects such as memory for the pool to manage. | |
| 689 Use this option to define or declare any external | |
| 690 objects needed by the pool's static initializer below. | |
| 691 Example: create some memory for a mempool using | |
| 692 'static char fpool1[2000];' | |
| 693 to set up a chunk of memory of 2000 bytes. | |
| 694 Note: this option is invoked in the 'outermost' context | |
| 695 of C++ source, where global/static objects are created; | |
| 696 it should contain valid, self-contained, C++ source." | |
| 697 } | |
| 698 cdl_option CYGDAT_UITRON_MEMPOOLFIXED_INITIALIZERS { | |
| 699 display "Static initializers" | |
| 700 parent CYGPKG_UITRON_MEMPOOLFIXED | |
| 701 type multiline | |
| 702 description "Fixed block memory pools should be statically | |
| 703 initialized: enter a list of initializers | |
| 704 separated by commas, one per line. | |
| 705 An initializer is | |
| 706 'CYG_UIT_MEMPOOLFIXED(ADDR,SIZE,BLOCK)' | |
| 707 where addr is the address of memory to manage, | |
| 708 size is the total size of that memory, and | |
| 709 block is the block size for allocation by the pool. | |
| 710 If create and delete operations are supported, | |
| 711 initializers of the form | |
| 712 'CYG_UIT_MEMPOOLFIXED_NOEXS(ADDR,SIZE)' should be | |
| 713 used for pools which are not initially created, to tell | |
| 714 the system what memory to use for each pool. | |
| 715 Note: this option is invoked in the context of a | |
| 716 C++ array initializer, between curly brackets. | |
| 717 Ensure that the number of initializers here exactly | |
| 718 matches the total number of fixed pools specified." | |
| 719 } | |
| 720 }}CFG_DATA */ | |
| 721 | |
| 722 #define CYGPKG_UITRON_MEMPOOLFIXED | |
| 723 #define CYGNUM_UITRON_MEMPOOLFIXED 3 | |
| 724 | |
| 725 #ifdef CYGPKG_UITRON_MEMPOOLFIXED | |
| 726 #if 0 < CYGNUM_UITRON_MEMPOOLFIXED | |
| 727 | |
| 728 #define CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE | |
| 729 | |
| 730 #ifdef CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE | |
| 731 #define CYGNUM_UITRON_MEMPOOLFIXED_INITIALLY 3 | |
| 732 #endif // CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE | |
| 733 | |
| 734 #define CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS \ | |
| 735 static char fpool1[ 2000 ], \ | |
| 736 fpool2[ 2000 ], \ | |
| 737 fpool3[ 2000 ]; | |
| 738 | |
| 739 // in terms of CYG_UIT_MEMPOOLFIXED( addr, size, blocksize ); | |
| 740 // [or CYG_UIT_MEMPOOLFIXED_NOEXS( addr, size ) if cre/del supported] | |
| 741 #define CYGDAT_UITRON_MEMPOOLFIXED_INITIALIZERS \ | |
| 742 CYG_UIT_MEMPOOLFIXED( fpool1, 2000, 20 ), \ | |
| 743 CYG_UIT_MEMPOOLFIXED( fpool2, 2000, 100 ), \ | |
| 744 CYG_UIT_MEMPOOLFIXED( fpool3, 2000, 500 ), \ | |
| 745 | |
| 746 #endif | |
| 747 #endif // do we have fixed memory pools? | |
| 748 | |
| 749 // Variable block memory pools: | |
| 750 | |
| 751 /* {{CFG_DATA | |
| 752 cdl_component CYGPKG_UITRON_MEMPOOLVAR { | |
| 2 | 753 display "Variable-size memorypools" |
| 0 | 754 type boolean |
| 755 parent CYGPKG_UITRON | |
| 756 description "uITRON supports memory pools for dynamic, task-safe | |
| 757 memory allocation. | |
| 758 Two kinds are supported, fixed-size and variable-size. | |
| 759 There may be multiple of each | |
| 760 type of pool, each with differing characteristics. | |
| 761 This option controls whether there are any variable-size | |
| 762 memorypools in the system. | |
| 763 A variable-size memorypool allocates blocks of memory of | |
| 764 any size requested, resources permitting." | |
| 765 } | |
| 766 cdl_option CYGNUM_UITRON_MEMPOOLVAR { | |
| 767 display "Number of variable-size memory pools" | |
| 768 parent CYGPKG_UITRON_MEMPOOLVAR | |
| 769 type count | |
| 770 legal_values 1 to 65535 | |
| 771 description "The number of uITRON Variable-Size | |
| 772 Memorypools present in the system. | |
| 773 Valid Variable-Size Memorypool IDs will range | |
| 774 from 1 to this value." | |
| 775 } | |
| 776 cdl_component CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE { | |
| 777 display "Support create and delete" | |
| 778 parent CYGPKG_UITRON_MEMPOOLVAR | |
| 779 type boolean | |
| 780 description "Support | |
| 781 variable-size memory pool | |
| 782 create and delete operations | |
| 783 (cre_mpl, del_mpl). | |
| 784 Otherwise all variable-size mempools are created, | |
| 785 up to the number specified above." | |
| 786 } | |
| 787 cdl_option CYGNUM_UITRON_MEMPOOLVAR_INITIALLY { | |
| 788 display "Number of variable-size mempools created initially" | |
| 789 parent CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE | |
| 790 type count | |
| 791 legal_values 0 to 65535 | |
| 792 description "The number of variable-size mempools initially created. | |
| 793 This number should not be more than the number | |
| 794 of variable mempools in the system, though setting | |
| 795 it to a large value to mean 'all' is acceptable. | |
| 796 Initially, only variable mempools numbered from | |
| 797 1 to this number exist; | |
| 798 higher numbered ones must be created before use. | |
| 799 All mempools must be initialized to tell | |
| 800 the system what memory to use for each pool." | |
| 801 } | |
| 802 cdl_option CYGDAT_UITRON_MEMPOOLVAR_EXTERNS { | |
| 803 display "Externs for initialization" | |
| 804 parent CYGPKG_UITRON_MEMPOOLVAR | |
| 805 type multiline | |
| 806 description "Variable mempool initializers may refer to external | |
| 807 objects such as memory for the pool to manage. | |
| 808 Use this option to define or declare any external | |
| 809 objects needed by the pool's static initializer below. | |
| 810 Example: create some memory for a mempool using | |
| 811 'static char vpool1[2000];' | |
| 812 to set up a chunk of memory of 2000 bytes. | |
| 813 Note: this option is invoked in the 'outermost' context | |
| 814 of C++ source, where global/static objects are created; | |
| 815 it should contain valid, self-contained, C++ source." | |
| 816 } | |
| 817 cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS { | |
| 818 display "Static initializers" | |
| 819 parent CYGPKG_UITRON_MEMPOOLVAR | |
| 820 type multiline | |
| 821 description "Variable block memory pools should be statically | |
| 822 initialized: enter a list of initializers | |
| 823 separated by commas, one per line. | |
| 824 An initializer is | |
| 825 'CYG_UIT_MEMPOOLVAR(ADDR,SIZE)' | |
| 826 where addr is the address of memory to manage, and | |
| 827 size is the total size of that memory. | |
| 828 If create and delete operations are supported, | |
| 829 initializers of the form | |
| 830 'CYG_UIT_MEMPOOLVAR_NOEXS(ADDR,SIZE)' should be | |
| 831 used for pools which are not initially created, to tell | |
| 832 the system what memory to use for each pool. | |
| 833 Note: this option is invoked in the context of a | |
| 834 C++ array initializer, between curly brackets. | |
| 835 Ensure that the number of initializers here exactly | |
| 836 matches the total number of variable pools specified." | |
| 837 } | |
| 838 }}CFG_DATA */ | |
| 839 | |
| 840 #define CYGPKG_UITRON_MEMPOOLVAR | |
| 841 #define CYGNUM_UITRON_MEMPOOLVAR 3 | |
| 842 | |
| 843 #ifdef CYGPKG_UITRON_MEMPOOLVAR | |
| 844 #if 0 < CYGNUM_UITRON_MEMPOOLVAR | |
| 845 | |
| 846 #define CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE | |
| 847 | |
| 848 #ifdef CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE | |
| 849 #define CYGNUM_UITRON_MEMPOOLVAR_INITIALLY 3 | |
| 850 #endif // CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE | |
| 851 | |
| 852 #define CYGDAT_UITRON_MEMPOOLVAR_EXTERNS \ | |
| 853 static char vpool1[ 2000 ], \ | |
| 854 vpool2[ 2000 ], \ | |
| 855 vpool3[ 2000 ]; | |
| 856 | |
| 857 // in terms of CYG_UIT_MEMPOOLVAR( addr, size ); | |
| 858 // [or CYG_UIT_MEMPOOLVAR_NOEXS( addr, size ) if cre/del supported] | |
| 859 #define CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS \ | |
| 860 CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \ | |
| 861 CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \ | |
| 862 CYG_UIT_MEMPOOLVAR( vpool3, 2000 ), \ | |
| 863 | |
| 864 #endif | |
| 865 #endif // do we have variable memory pools? | |
| 866 | |
| 867 // ------------------------------------------------------------------------ | |
| 868 // One-shot Alarm and Cyclic Alarm handlers: | |
| 869 // | |
| 870 // These are declared without uninitialization; they must be defined in | |
| 871 // order to use them. | |
| 872 | |
| 873 | |
| 874 /* {{CFG_DATA | |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
875 cdl_option CYGSEM_UITRON_TIME_IS_MILLISECONDS { |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
876 display "uITRON time unit is mS" |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
877 type boolean |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
878 parent CYGPKG_UITRON |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
879 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
880 description " |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
881 Setting this option enables a conversion feature so that |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
882 time parameters to uITRON APIs are converted from milliSeconds |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
883 to whatever the eCos kernel real-time clock's units are, |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
884 or vice versa. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
885 If this option is not set, time parameters are expressed in |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
886 kernel clock ticks." |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
887 } |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
888 }}CFG_DATA */ |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
889 |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
890 #undef CYGSEM_UITRON_TIME_IS_MILLISECONDS |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
891 |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
34
diff
changeset
|
892 /* {{CFG_DATA |
| 0 | 893 cdl_component CYGPKG_UITRON_ALARMS { |
| 2 | 894 display "Alarm handlers" |
| 0 | 895 type boolean |
| 896 parent CYGPKG_UITRON | |
| 897 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 898 description "uITRON Alarm Handlers are used with functions | |
| 899 named def_alm() and ref_alm(); they support | |
| 900 simple timing, with a function callback | |
| 901 at the end of the timed period." | |
| 902 } | |
| 903 cdl_option CYGNUM_UITRON_ALARMS { | |
| 904 display "Number of alarm handlers" | |
| 905 parent CYGPKG_UITRON_ALARMS | |
| 906 type count | |
| 907 legal_values 1 to 65535 | |
| 908 description "The number of uITRON alarm | |
| 909 handlers present in the system. | |
| 910 Valid alarm handler numbers will range | |
| 911 from 1 to this value." | |
| 912 } | |
| 913 }}CFG_DATA */ | |
| 914 #define CYGPKG_UITRON_ALARMS | |
| 915 #define CYGNUM_UITRON_ALARMS 3 | |
| 916 #if 0 // initializers not supported | |
| 917 #if 0 < CYGNUM_UITRON_ALARMS | |
| 918 //#define CYGDAT_UITRON_ALARM_EXTERNS | |
| 919 // in terms of ALARM( ... ) | |
| 920 //#define CYGDAT_UITRON_ALARM_INITIALIZERS | |
| 921 #endif | |
| 922 #endif // NOT SUPPORTED | |
| 923 | |
| 924 | |
| 925 /* {{CFG_DATA | |
| 926 cdl_component CYGPKG_UITRON_CYCLICS { | |
| 2 | 927 display "Cyclic handlers" |
| 0 | 928 type boolean |
| 929 parent CYGPKG_UITRON | |
| 930 requires CYGVAR_KERNEL_COUNTERS_CLOCK | |
| 931 description "uITRON Cyclic Handlers are used with functions | |
| 932 named xxx_cyc(); they support timing | |
| 933 with a periodic function callback that | |
| 934 can be dynamically turned on or off, and | |
| 935 resynchronized with external events." | |
| 936 } | |
| 937 cdl_option CYGNUM_UITRON_CYCLICS { | |
| 938 display "Number cyclic handlers" | |
| 939 parent CYGPKG_UITRON_CYCLICS | |
| 940 type count | |
| 941 legal_values 1 to 65535 | |
| 942 description "The number of uITRON cyclics | |
| 943 handlers present in the system. | |
| 944 Valid cyclic handler numbers will range | |
| 945 from 1 to this value." | |
| 946 } | |
| 947 }}CFG_DATA */ | |
| 948 #define CYGPKG_UITRON_CYCLICS | |
| 949 #define CYGNUM_UITRON_CYCLICS 3 | |
| 950 #if 0 // initializers not supported | |
| 951 #if 0 < CYGNUM_UITRON_CYCLICS | |
| 952 //#define CYGDAT_UITRON_CYCLIC_EXTERNS | |
| 953 // in terms of CYCLIC( ... ) | |
| 954 //#define CYGDAT_UITRON_CYCLIC_INITIALIZERS | |
| 955 #endif | |
| 956 #endif // NOT SUPPORTED | |
| 957 | |
|
34
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
958 // ------------------------------------------------------------------------ |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
959 // Interrupt-safe functions [ixxx_yyy()]: |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
960 // |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
961 // These can queue up requests for execution in a DSR or maybe execute |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
962 // immediately if safe so to do. |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
963 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
964 /* {{CFG_DATA |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
965 cdl_component CYGPKG_UITRON_INTERRUPT_FUNCTIONS { |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
966 display "Interrupt-safe functions" |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
967 type dummy |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
968 parent CYGPKG_UITRON |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
969 description "The uITRON system provides some functions which may |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
970 safely be used within interrupt handlers. In eCos, this |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
971 means within ISRs, providing that the corresponding DSR is |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
972 associated with that interrupt. These functions are |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
973 typically named ixxx_yyy(), according to the uITRON |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
974 specification, for example isig_sem() corresponds to normal |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
975 function sig_sem()." |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
976 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
977 } |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
978 cdl_option CYGSEM_UITRON_ISRFUNCS_TRY_IMMEDIATE_EXECUTION { |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
979 display "Execute in ISR if safe" |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
980 parent CYGPKG_UITRON_INTERRUPT_FUNCTIONS |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
981 type boolean |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
982 description "These functions of necessity maintain a queue of |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
983 operations requested for deferred execution. However, |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
984 during an interrupt, it may be safe to perform scheduling |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
985 operations. If this option is set, the interrupt-safe |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
986 functions will have effect there and then if it is indeed |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
987 safe, rather than queueing a request to perform the |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
988 operation in the DSR." |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
989 } |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
990 cdl_option CYGNUM_UITRON_ISR_ACTION_QUEUESIZE { |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
991 display "Deferred operation queue size" |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
992 parent CYGPKG_UITRON_INTERRUPT_FUNCTIONS |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
993 type enum |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
994 legal_values 4 8 16 32 64 128 256 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
995 description "These functions of necessity maintain a queue of |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
996 operations requested for deferred execution. This option |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
997 controls the queue size. It must be a power of two for |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
998 implementation reasons." |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
999 } |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1000 }}CFG_DATA */ |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1001 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1002 #define CYGSEM_UITRON_ISRFUNCS_TRY_IMMEDIATE_EXECUTION |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1003 #define CYGNUM_UITRON_ISR_ACTION_QUEUESIZE 32 |
|
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1004 |
| 0 | 1005 // ======================================================================== |
| 1006 // ------------------------------------------------------------------------ | |
| 1007 // uITRON VERSION INFORMATION | |
| 1008 // ------------------------------------------------------------------------ | |
| 1009 | |
| 1010 /* {{CFG_DATA | |
| 1011 cdl_component CYGPKG_UITRON_VERSION { | |
| 1012 display "Version information" | |
| 1013 type dummy | |
| 1014 parent CYGPKG_UITRON | |
| 1015 description "The get_ver() uITRON system call returns | |
| 1016 several version related values describing | |
| 1017 the vendor, product and CPU in question | |
| 1018 as well as the version of the uITRON | |
| 1019 standard supported. | |
| 1020 These values may be specified here." | |
| 1021 } | |
| 1022 cdl_option CYGNUM_UITRON_VER_MAKER { | |
| 2 | 1023 display "OS maker" |
| 0 | 1024 parent CYGPKG_UITRON_VERSION |
| 1025 type count | |
| 1026 legal_values 0 to 0xFFFF | |
| 1027 description "This value is returned in the 'maker' | |
| 1028 field of the T_VER structure in | |
| 1029 response to a get_ver() system call." | |
| 1030 } | |
| 1031 cdl_option CYGNUM_UITRON_VER_ID { | |
| 2 | 1032 display "OS identification" |
| 0 | 1033 parent CYGPKG_UITRON_VERSION |
| 1034 type count | |
| 1035 legal_values 0 to 0xFFFF | |
| 1036 description "This value is returned in the 'id' | |
| 1037 field of the T_VER structure in | |
| 1038 response to a get_ver() system call." | |
| 1039 } | |
| 1040 cdl_option CYGNUM_UITRON_VER_SPVER { | |
| 2 | 1041 display "ITRON specification" |
| 0 | 1042 parent CYGPKG_UITRON_VERSION |
| 1043 type count | |
| 1044 legal_values 0 to 0xFFFF | |
| 1045 description "This value is returned in the 'spver' | |
| 1046 field of the T_VER structure in | |
| 1047 response to a get_ver() system call. | |
| 1048 Do NOT change this value." | |
| 1049 } | |
| 1050 cdl_option CYGNUM_UITRON_VER_PRVER { | |
| 2 | 1051 display "OS product version" |
| 0 | 1052 parent CYGPKG_UITRON_VERSION |
| 1053 type count | |
| 1054 legal_values 0 to 0xFFFF | |
| 1055 description "This value is returned in the 'prver' | |
| 1056 field of the T_VER structure in | |
| 1057 response to a get_ver() system call." | |
| 1058 } | |
| 1059 # PRNO fields in own folder | |
| 1060 cdl_component CYGPKG_UITRON_VERSION_PRNO { | |
| 2 | 1061 display "Product info" |
| 0 | 1062 type dummy |
| 1063 parent CYGPKG_UITRON_VERSION | |
| 1064 description "The get_ver() uITRON system call returns | |
| 1065 several version related values describing | |
| 1066 the vendor, product and CPU in question | |
| 1067 as well as the version of the uITRON | |
| 1068 standard supported. | |
| 1069 These values may be specified here." | |
| 1070 } | |
| 1071 cdl_option CYGNUM_UITRON_VER_PRNO_0 { | |
| 1072 display "Field 0" | |
| 1073 parent CYGPKG_UITRON_VERSION_PRNO | |
| 1074 type count | |
| 1075 legal_values 0 to 0xFFFF | |
| 1076 description "This value is returned in the 'prno[0]' | |
| 1077 field of the T_VER structure in | |
| 1078 response to a get_ver() system call." | |
| 1079 } | |
| 1080 cdl_option CYGNUM_UITRON_VER_PRNO_1 { | |
| 1081 display "Field 1" | |
| 1082 parent CYGPKG_UITRON_VERSION_PRNO | |
| 1083 type count | |
| 1084 legal_values 0 to 0xFFFF | |
| 1085 description "This value is returned in the 'prno[1]' | |
| 1086 field of the T_VER structure in | |
| 1087 response to a get_ver() system call." | |
| 1088 } | |
| 1089 cdl_option CYGNUM_UITRON_VER_PRNO_2 { | |
| 1090 display "Field 2" | |
| 1091 parent CYGPKG_UITRON_VERSION_PRNO | |
| 1092 type count | |
| 1093 legal_values 0 to 0xFFFF | |
| 1094 description "This value is returned in the 'prno[2]' | |
| 1095 field of the T_VER structure in | |
| 1096 response to a get_ver() system call." | |
| 1097 } | |
| 1098 cdl_option CYGNUM_UITRON_VER_PRNO_3 { | |
| 1099 display "Field 3" | |
| 1100 parent CYGPKG_UITRON_VERSION_PRNO | |
| 1101 type count | |
| 1102 legal_values 0 to 0xFFFF | |
| 1103 description "This value is returned in the 'prno[3]' | |
| 1104 field of the T_VER structure in | |
| 1105 response to a get_ver() system call." | |
| 1106 } | |
| 1107 # up a level | |
| 1108 cdl_option CYGNUM_UITRON_VER_CPU { | |
| 2 | 1109 display "CPU information" |
| 0 | 1110 parent CYGPKG_UITRON_VERSION |
| 1111 type count | |
| 1112 legal_values 0 to 0xFFFF | |
| 1113 description "This value is returned in the 'cpu' | |
| 1114 field of the T_VER structure in | |
| 1115 response to a get_ver() system call." | |
| 1116 } | |
| 1117 cdl_option CYGNUM_UITRON_VER_VAR { | |
| 2 | 1118 display "System variant" |
| 0 | 1119 parent CYGPKG_UITRON_VERSION |
| 1120 type count | |
| 1121 legal_values 0 to 0xFFFF | |
| 1122 description "This value is returned in the 'var' | |
| 1123 field of the T_VER structure in | |
| 1124 response to a get_ver() system call. | |
| 1125 Do NOT change this value." | |
| 1126 } | |
|
34
29bc183297e1
Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents:
2
diff
changeset
|
1127 }}CFG_DATA */ |
| 0 | 1128 |
| 1129 // these constants are returned by the get_ver API call. | |
| 1130 | |
| 1131 #define CYGNUM_UITRON_VER_MAKER 0 /* vendor */ | |
| 1132 #define CYGNUM_UITRON_VER_ID 0 /* format number */ | |
| 1133 #define CYGNUM_UITRON_VER_SPVER 0x5302 /* specification version */ | |
| 1134 #define CYGNUM_UITRON_VER_PRVER 0x0100 /* product version */ | |
| 1135 #define CYGNUM_UITRON_VER_PRNO_0 0 /* product control information */ | |
| 1136 #define CYGNUM_UITRON_VER_PRNO_1 0 | |
| 1137 #define CYGNUM_UITRON_VER_PRNO_2 0 | |
| 1138 #define CYGNUM_UITRON_VER_PRNO_3 0 | |
| 1139 #define CYGNUM_UITRON_VER_CPU 0 /* CPU information */ | |
| 1140 #define CYGNUM_UITRON_VER_VAR 0x8000 /* variation descriptor */ | |
| 1141 | |
| 1142 | |
| 1143 #endif // CYGPKG_UITRON | |
| 1144 | |
| 1145 #endif // CYGONCE_PKGCONF_UITRON_H | |
| 1146 // EOF pgkconf/uitron.h |
