[b96254f] | 1 | /** |
---|
[27f071cd] | 2 | * @file |
---|
[08bae5e6] | 3 | * |
---|
[9ab091e] | 4 | * @brief Configuration Table Template that will be Instantiated |
---|
| 5 | * by an Application |
---|
| 6 | * |
---|
[27f071cd] | 7 | * This include file contains the configuration table template that will |
---|
| 8 | * be instantiated by an application based on the setting of a number |
---|
| 9 | * of macros. The macros are documented in the Configuring a System |
---|
| 10 | * chapter of the Classic API User's Guide |
---|
[b96254f] | 11 | */ |
---|
[28352fae] | 12 | |
---|
| 13 | /* |
---|
[bfe6391] | 14 | * COPYRIGHT (c) 1989-2015. |
---|
[08bae5e6] | 15 | * On-Line Applications Research Corporation (OAR). |
---|
| 16 | * |
---|
[98e4ebf5] | 17 | * The license and distribution terms for this file may be |
---|
| 18 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 19 | * http://www.rtems.org/license/LICENSE. |
---|
[08bae5e6] | 20 | */ |
---|
| 21 | |
---|
| 22 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
| 23 | #define __CONFIGURATION_TEMPLATE_h |
---|
[8486081] | 24 | |
---|
[9c63d90] | 25 | /* |
---|
| 26 | * Include the executive's configuration |
---|
| 27 | */ |
---|
[58fa947] | 28 | #include <rtems.h> |
---|
[5fc855d] | 29 | #include <rtems/extensiondata.h> |
---|
[18ff889] | 30 | #include <rtems/ioimpl.h> |
---|
[a853c851] | 31 | #include <rtems/sysinit.h> |
---|
[b2b143f4] | 32 | #include <rtems/score/apimutex.h> |
---|
[fc398fd] | 33 | #include <rtems/score/context.h> |
---|
[48fed9a] | 34 | #include <rtems/score/percpu.h> |
---|
[a853c851] | 35 | #include <rtems/score/userextimpl.h> |
---|
[9fa3cf0d] | 36 | #include <rtems/score/wkspace.h> |
---|
[395a49e1] | 37 | #include <rtems/rtems/barrierdata.h> |
---|
[72a4a42] | 38 | #include <rtems/rtems/dpmemdata.h> |
---|
[257668d] | 39 | #include <rtems/rtems/messagedata.h> |
---|
[f00c5c6] | 40 | #include <rtems/rtems/partdata.h> |
---|
[78bbe59] | 41 | #include <rtems/rtems/ratemondata.h> |
---|
[e8e914b3] | 42 | #include <rtems/rtems/regiondata.h> |
---|
[739df1f5] | 43 | #include <rtems/rtems/semdata.h> |
---|
[b7af3e44] | 44 | #include <rtems/rtems/tasksdata.h> |
---|
[e1b7c188] | 45 | #include <rtems/rtems/timerdata.h> |
---|
[9318cfb0] | 46 | #include <rtems/posix/key.h> |
---|
[fe7aefd5] | 47 | #include <rtems/posix/mqueue.h> |
---|
[21275b58] | 48 | #include <rtems/posix/psignal.h> |
---|
[54f35888] | 49 | #include <rtems/posix/pthread.h> |
---|
[9318cfb0] | 50 | #include <rtems/posix/semaphore.h> |
---|
[701057e0] | 51 | #include <rtems/posix/shm.h> |
---|
[21275b58] | 52 | #include <rtems/posix/timer.h> |
---|
[9318cfb0] | 53 | |
---|
| 54 | #include <limits.h> |
---|
[9c63d90] | 55 | |
---|
[7571a23] | 56 | #ifdef CONFIGURE_DISABLE_BSP_SETTINGS |
---|
| 57 | #undef BSP_DEFAULT_UNIFIED_WORK_AREAS |
---|
| 58 | #undef BSP_IDLE_TASK_BODY |
---|
| 59 | #undef BSP_IDLE_TASK_STACK_SIZE |
---|
| 60 | #undef BSP_INITIAL_EXTENSION |
---|
| 61 | #undef BSP_INTERRUPT_STACK_SIZE |
---|
| 62 | #undef BSP_MAXIMUM_DEVICES |
---|
| 63 | #undef CONFIGURE_BSP_PREREQUISITE_DRIVERS |
---|
| 64 | #undef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 65 | #else |
---|
| 66 | #include <bsp.h> |
---|
| 67 | #endif |
---|
| 68 | |
---|
[9c9b62d8] | 69 | #ifdef RTEMS_NEWLIB |
---|
| 70 | #include <sys/reent.h> |
---|
| 71 | #endif |
---|
| 72 | |
---|
[5877cc3a] | 73 | #ifdef __cplusplus |
---|
| 74 | extern "C" { |
---|
| 75 | #endif |
---|
| 76 | |
---|
[07d71279] | 77 | /* |
---|
| 78 | * Internal defines must be prefixed with _CONFIGURE to distinguish them from |
---|
| 79 | * user-provided options which use a CONFIGURE prefix. |
---|
| 80 | */ |
---|
| 81 | |
---|
[bfe6391] | 82 | /** |
---|
| 83 | * @defgroup Configuration RTEMS Configuration |
---|
| 84 | * |
---|
| 85 | * This module contains all RTEMS Configuration parameters. |
---|
| 86 | * |
---|
| 87 | * The model is to estimate the memory required for each configured item |
---|
| 88 | * and sum those estimates. The estimate can be too high or too low for |
---|
| 89 | * a variety of reasons: |
---|
| 90 | * |
---|
| 91 | * Reasons estimate is too high: |
---|
| 92 | * + FP contexts (not all tasks are FP) |
---|
| 93 | * |
---|
| 94 | * Reasons estimate is too low: |
---|
| 95 | * + stacks greater than minimum size |
---|
| 96 | * + messages |
---|
| 97 | * + application must account for device driver resources |
---|
| 98 | * + application must account for add-on library resource requirements |
---|
| 99 | * |
---|
| 100 | * NOTE: Eventually this may be able to take into account some of |
---|
| 101 | * the above. This procedure has evolved from just enough to |
---|
| 102 | * support the RTEMS Test Suites into something that can be |
---|
| 103 | * used remarkably reliably by most applications. |
---|
| 104 | */ |
---|
| 105 | |
---|
| 106 | /** |
---|
| 107 | * This is the Classic API initialization tasks table. |
---|
| 108 | */ |
---|
[08bae5e6] | 109 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
[bfe6391] | 110 | |
---|
[5877cc3a] | 111 | /** |
---|
[27f071cd] | 112 | * This macro determines whether the RTEMS reentrancy support for |
---|
| 113 | * the Newlib C Library is enabled. |
---|
[3b89891] | 114 | */ |
---|
[5aecf664] | 115 | #ifdef RTEMS_SCHEDSIM |
---|
| 116 | #undef RTEMS_NEWLIB |
---|
| 117 | #endif |
---|
| 118 | |
---|
| 119 | #ifndef RTEMS_SCHEDSIM |
---|
[efd2965a] | 120 | #include <rtems/libio_.h> |
---|
[d40da79b] | 121 | |
---|
| 122 | #ifdef CONFIGURE_INIT |
---|
[3d36164f] | 123 | #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 124 | RTEMS_SYSINIT_ITEM( |
---|
| 125 | rtems_filesystem_initialize, |
---|
| 126 | RTEMS_SYSINIT_ROOT_FILESYSTEM, |
---|
| 127 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 128 | ); |
---|
[a290fbe9] | 129 | #endif |
---|
[d40da79b] | 130 | #endif |
---|
[5aecf664] | 131 | #endif |
---|
[d40da79b] | 132 | |
---|
[3cec2df] | 133 | #ifdef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
| 134 | #warning "CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS has been renamed to CONFIGURE_MAXIMUM_FILE_DESCRIPTORS since RTEMS 5.1" |
---|
| 135 | #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
| 136 | #endif |
---|
| 137 | |
---|
[5877cc3a] | 138 | /** |
---|
[27f071cd] | 139 | * This macro defines the number of POSIX file descriptors allocated |
---|
| 140 | * and managed by libio. These are the "integer" file descriptors that |
---|
| 141 | * are used by calls like open(2) and read(2). |
---|
[df49c60] | 142 | */ |
---|
[3cec2df] | 143 | #ifndef CONFIGURE_MAXIMUM_FILE_DESCRIPTORS |
---|
| 144 | #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 3 |
---|
[bd9c3d1] | 145 | #endif |
---|
| 146 | |
---|
[07d71279] | 147 | /* |
---|
[5c0c0cf] | 148 | * POSIX key count used by the IO library. |
---|
| 149 | */ |
---|
[07d71279] | 150 | #define _CONFIGURE_LIBIO_POSIX_KEYS 1 |
---|
[5c0c0cf] | 151 | |
---|
[43908825] | 152 | #ifdef CONFIGURE_INIT |
---|
[3cec2df] | 153 | rtems_libio_t rtems_libio_iops[CONFIGURE_MAXIMUM_FILE_DESCRIPTORS]; |
---|
[efd2965a] | 154 | |
---|
[5877cc3a] | 155 | /** |
---|
[27f071cd] | 156 | * When instantiating the configuration tables, this variable is |
---|
| 157 | * initialized to specify the maximum number of file descriptors. |
---|
[5877cc3a] | 158 | */ |
---|
[efd2965a] | 159 | const uint32_t rtems_libio_number_iops = RTEMS_ARRAY_SIZE(rtems_libio_iops); |
---|
[43908825] | 160 | #endif |
---|
| 161 | |
---|
[54835ae] | 162 | #ifdef CONFIGURE_SMP_MAXIMUM_PROCESSORS |
---|
[9526b034] | 163 | #warning "CONFIGURE_SMP_MAXIMUM_PROCESSORS has been renamed to CONFIGURE_MAXIMUM_PROCESSORS since RTEMS 5.1" |
---|
[54835ae] | 164 | #define CONFIGURE_MAXIMUM_PROCESSORS CONFIGURE_SMP_MAXIMUM_PROCESSORS |
---|
| 165 | #endif |
---|
| 166 | |
---|
[334e1d2] | 167 | /* Ensure that _CONFIGURE_MAXIMUM_PROCESSORS > 1 only in SMP configurations */ |
---|
| 168 | #if defined(CONFIGURE_MAXIMUM_PROCESSORS) && defined(RTEMS_SMP) |
---|
| 169 | #define _CONFIGURE_MAXIMUM_PROCESSORS CONFIGURE_MAXIMUM_PROCESSORS |
---|
| 170 | #else |
---|
| 171 | #define _CONFIGURE_MAXIMUM_PROCESSORS 1 |
---|
[f95fa387] | 172 | #endif |
---|
| 173 | |
---|
| 174 | /* |
---|
| 175 | * An internal define to indicate that this is an SMP application |
---|
| 176 | * configuration. |
---|
| 177 | */ |
---|
[13097181] | 178 | #ifdef RTEMS_SMP |
---|
| 179 | #if !defined(CONFIGURE_DISABLE_SMP_CONFIGURATION) |
---|
| 180 | #define _CONFIGURE_SMP_APPLICATION |
---|
[334e1d2] | 181 | #elif _CONFIGURE_MAXIMUM_PROCESSORS > 1 |
---|
[13097181] | 182 | #error "CONFIGURE_DISABLE_SMP_CONFIGURATION and CONFIGURE_MAXIMUM_PROCESSORS > 1 makes no sense" |
---|
| 183 | #endif |
---|
[f95fa387] | 184 | #endif |
---|
| 185 | |
---|
| 186 | #ifdef CONFIGURE_SMP_APPLICATION |
---|
[9526b034] | 187 | #warning "CONFIGURE_SMP_APPLICATION is obsolete since RTEMS 5.1" |
---|
[06dcaf0] | 188 | #endif |
---|
| 189 | |
---|
[16939b18] | 190 | /* |
---|
| 191 | * This sets up the resources for the FIFOs/pipes. |
---|
| 192 | */ |
---|
| 193 | |
---|
[bfe6391] | 194 | /** |
---|
| 195 | * This is specified to configure the maximum number of POSIX FIFOs. |
---|
| 196 | */ |
---|
[6f6091b3] | 197 | #ifdef CONFIGURE_MAXIMUM_FIFOS |
---|
| 198 | #warning "CONFIGURE_MAXIMUM_FIFOS is obsolete since RTEMS 5.1; use CONFIGURE_IMFS_ENABLE_MKFIFO instead" |
---|
| 199 | #if CONFIGURE_MAXIMUM_FIFOS > 0 |
---|
| 200 | #define CONFIGURE_IMFS_ENABLE_MKFIFO |
---|
| 201 | #endif |
---|
[16939b18] | 202 | #endif |
---|
| 203 | |
---|
[bfe6391] | 204 | /** |
---|
| 205 | * This is specified to configure the maximum number of POSIX named pipes. |
---|
| 206 | */ |
---|
[6f6091b3] | 207 | #ifdef CONFIGURE_MAXIMUM_PIPES |
---|
| 208 | #warning "CONFIGURE_MAXIMUM_PIPES is obsolete since RTEMS 5.1; use CONFIGURE_IMFS_ENABLE_MKFIFO instead" |
---|
| 209 | #if CONFIGURE_MAXIMUM_PIPES > 0 |
---|
| 210 | #define CONFIGURE_IMFS_ENABLE_MKFIFO |
---|
| 211 | #endif |
---|
[16939b18] | 212 | #endif |
---|
| 213 | |
---|
[bfe6391] | 214 | /** |
---|
| 215 | * @defgroup ConfigFilesystems Filesystems and Mount Table Configuration |
---|
| 216 | * |
---|
| 217 | * @ingroup Configuration |
---|
[29e92b0] | 218 | * |
---|
| 219 | * Defines to control the file system: |
---|
| 220 | * |
---|
[bfe6391] | 221 | * - CONFIGURE_APPLICATION_DISABLE_FILESYSTEM: |
---|
[29e92b0] | 222 | * Disable the RTEMS filesystems. You get an empty DEVFS. |
---|
| 223 | * |
---|
[bfe6391] | 224 | * - CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM: |
---|
[29e92b0] | 225 | * Use the DEVFS as the root file system. Limited functions are |
---|
| 226 | * provided when this is used. |
---|
| 227 | * |
---|
[bfe6391] | 228 | * - CONFIGURE_FILESYSTEM_ALL: |
---|
[29e92b0] | 229 | * Add file filesystems to the default filesystem table. |
---|
| 230 | * |
---|
| 231 | * List of available file systems. You can define as many as you like: |
---|
[bfe6391] | 232 | * - CONFIGURE_FILESYSTEM_IMFS - In Memory File System (IMFS) |
---|
| 233 | * - CONFIGURE_FILESYSTEM_DEVFS - Device File System (DSVFS) |
---|
| 234 | * - CONFIGURE_FILESYSTEM_TFTPFS - TFTP File System, networking enabled |
---|
| 235 | * - CONFIGURE_FILESYSTEM_FTPFS - FTP File System, networking enabled |
---|
| 236 | * - CONFIGURE_FILESYSTEM_NFS - Network File System, networking enabled |
---|
| 237 | * - CONFIGURE_FILESYSTEM_DOSFS - DOS File System, uses libblock |
---|
| 238 | * - CONFIGURE_FILESYSTEM_RFS - RTEMS File System (RFS), uses libblock |
---|
| 239 | * - CONFIGURE_FILESYSTEM_JFFS2 - Journalling Flash File System, Version 2 |
---|
[29e92b0] | 240 | * |
---|
| 241 | * Combinations: |
---|
| 242 | * |
---|
| 243 | * - If nothing is defined the base file system is the IMFS. |
---|
| 244 | * |
---|
[a9df916] | 245 | * - If CONFIGURE_APPLICATION_DISABLE_FILESYSTEM is defined all filesystems |
---|
| 246 | * are disabled by force. |
---|
[29e92b0] | 247 | * |
---|
[373cd1c5] | 248 | * - If CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM is defined all filesystems |
---|
[29e92b0] | 249 | * are disabled by force and DEVFS is defined. |
---|
| 250 | */ |
---|
[bfe6391] | 251 | /**@{*/ |
---|
[29e92b0] | 252 | |
---|
[d40da79b] | 253 | #ifdef CONFIGURE_INIT |
---|
[29e92b0] | 254 | |
---|
| 255 | /* |
---|
| 256 | * Include all file systems. Do this before checking if the filesystem has |
---|
| 257 | * been disabled. |
---|
| 258 | */ |
---|
| 259 | #ifdef CONFIGURE_FILESYSTEM_ALL |
---|
| 260 | #define CONFIGURE_FILESYSTEM_IMFS |
---|
| 261 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
| 262 | #define CONFIGURE_FILESYSTEM_TFTPFS |
---|
| 263 | #define CONFIGURE_FILESYSTEM_FTPFS |
---|
[59673224] | 264 | #define CONFIGURE_FILESYSTEM_NFS |
---|
[29e92b0] | 265 | #define CONFIGURE_FILESYSTEM_DOSFS |
---|
| 266 | #define CONFIGURE_FILESYSTEM_RFS |
---|
[3c96bee] | 267 | #define CONFIGURE_FILESYSTEM_JFFS2 |
---|
[29e92b0] | 268 | #endif |
---|
| 269 | |
---|
| 270 | /* |
---|
[80c1577] | 271 | * If disabling the file system, give a compile error if the user has |
---|
| 272 | * configured other filesystem parameters. |
---|
[29e92b0] | 273 | */ |
---|
[80c1577] | 274 | #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
[a9df916] | 275 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 276 | #error "Filesystem disabled and a base filesystem configured." |
---|
[80c1577] | 277 | #endif |
---|
| 278 | |
---|
[a9df916] | 279 | #if defined(CONFIGURE_FILESYSTEM_IMFS) || \ |
---|
| 280 | defined(CONFIGURE_FILESYSTEM_DEVFS) || \ |
---|
| 281 | defined(CONFIGURE_FILESYSTEM_TFTPFS) || \ |
---|
| 282 | defined(CONFIGURE_FILESYSTEM_FTPFS) || \ |
---|
| 283 | defined(CONFIGURE_FILESYSTEM_NFS) || \ |
---|
| 284 | defined(CONFIGURE_FILESYSTEM_DOSFS) || \ |
---|
| 285 | defined(CONFIGURE_FILESYSTEM_RFS) || \ |
---|
| 286 | defined(CONFIGURE_FILESYSTEM_JFFS2) |
---|
| 287 | #error "Filesystem disabled and a filesystem configured." |
---|
[9ab091e] | 288 | #endif |
---|
[29e92b0] | 289 | #endif |
---|
| 290 | |
---|
| 291 | /* |
---|
| 292 | * If the base filesystem is DEVFS define it else define IMFS. |
---|
| 293 | * We will have either DEVFS or IMFS defined after this. |
---|
| 294 | */ |
---|
[f89c34bb] | 295 | #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
| 296 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 297 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
| 298 | #endif |
---|
[29e92b0] | 299 | #endif |
---|
| 300 | |
---|
| 301 | #endif |
---|
| 302 | |
---|
[5aecf664] | 303 | #ifndef RTEMS_SCHEDSIM |
---|
[29e92b0] | 304 | /** |
---|
| 305 | * IMFS |
---|
| 306 | */ |
---|
| 307 | #include <rtems/imfs.h> |
---|
| 308 | |
---|
| 309 | /** |
---|
[27f071cd] | 310 | * This specifies the number of bytes per block for files within the IMFS. |
---|
| 311 | * There are a maximum number of blocks per file so this dictates the maximum |
---|
| 312 | * size of a file. This has to be balanced with the unused portion of each |
---|
| 313 | * block that might be wasted. |
---|
[29e92b0] | 314 | */ |
---|
| 315 | #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK |
---|
| 316 | #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ |
---|
| 317 | IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK |
---|
| 318 | #endif |
---|
| 319 | |
---|
| 320 | /** |
---|
[27f071cd] | 321 | * This defines the IMFS file system table entry. |
---|
[9ab091e] | 322 | */ |
---|
[29e92b0] | 323 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \ |
---|
[a9df916] | 324 | defined(CONFIGURE_FILESYSTEM_IMFS) |
---|
| 325 | #define CONFIGURE_FILESYSTEM_ENTRY_IMFS \ |
---|
| 326 | { RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize } |
---|
[29e92b0] | 327 | #endif |
---|
[5aecf664] | 328 | #endif |
---|
[29e92b0] | 329 | |
---|
[12eee4fd] | 330 | #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM |
---|
[249766c5] | 331 | #define CONFIGURE_IMFS_DISABLE_CHMOD |
---|
[12eee4fd] | 332 | #define CONFIGURE_IMFS_DISABLE_CHOWN |
---|
| 333 | #define CONFIGURE_IMFS_DISABLE_UTIME |
---|
| 334 | #define CONFIGURE_IMFS_DISABLE_LINK |
---|
| 335 | #define CONFIGURE_IMFS_DISABLE_SYMLINK |
---|
| 336 | #define CONFIGURE_IMFS_DISABLE_READLINK |
---|
| 337 | #define CONFIGURE_IMFS_DISABLE_RENAME |
---|
| 338 | #define CONFIGURE_IMFS_DISABLE_UNMOUNT |
---|
| 339 | #endif |
---|
| 340 | |
---|
[29e92b0] | 341 | /** |
---|
| 342 | * DEVFS |
---|
[9ab091e] | 343 | */ |
---|
[29e92b0] | 344 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \ |
---|
| 345 | defined(CONFIGURE_FILESYSTEM_DEVFS) |
---|
| 346 | #include <rtems/devfs.h> |
---|
[14fc3a77] | 347 | #define CONFIGURE_FILESYSTEM_ENTRY_DEVFS \ |
---|
| 348 | { RTEMS_FILESYSTEM_TYPE_DEVFS, devFS_initialize } |
---|
[29e92b0] | 349 | #endif |
---|
| 350 | |
---|
[251c94d] | 351 | /** |
---|
| 352 | * FTPFS |
---|
| 353 | */ |
---|
| 354 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \ |
---|
| 355 | defined(CONFIGURE_FILESYSTEM_FTPFS) |
---|
| 356 | #include <rtems/ftpfs.h> |
---|
| 357 | #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS \ |
---|
| 358 | { RTEMS_FILESYSTEM_TYPE_FTPFS, rtems_ftpfs_initialize } |
---|
| 359 | #endif |
---|
[29e92b0] | 360 | |
---|
[251c94d] | 361 | /** |
---|
| 362 | * TFTPFS |
---|
| 363 | */ |
---|
| 364 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \ |
---|
| 365 | defined(CONFIGURE_FILESYSTEM_TFTPFS) |
---|
| 366 | #include <rtems/tftp.h> |
---|
| 367 | #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS \ |
---|
| 368 | { RTEMS_FILESYSTEM_TYPE_TFTPFS, rtems_tftpfs_initialize } |
---|
| 369 | #endif |
---|
[29e92b0] | 370 | |
---|
[251c94d] | 371 | /** |
---|
| 372 | * NFS |
---|
| 373 | */ |
---|
| 374 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) && \ |
---|
| 375 | defined(CONFIGURE_FILESYSTEM_NFS) |
---|
| 376 | #include <librtemsNfs.h> |
---|
| 377 | #define CONFIGURE_FILESYSTEM_ENTRY_NFS \ |
---|
| 378 | { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize } |
---|
[29e92b0] | 379 | #endif |
---|
| 380 | |
---|
| 381 | /** |
---|
| 382 | * DOSFS |
---|
[9ab091e] | 383 | */ |
---|
[29e92b0] | 384 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \ |
---|
| 385 | defined(CONFIGURE_FILESYSTEM_DOSFS) |
---|
| 386 | #include <rtems/dosfs.h> |
---|
[14fc3a77] | 387 | #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS \ |
---|
| 388 | { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize } |
---|
[29e92b0] | 389 | #endif |
---|
| 390 | |
---|
| 391 | /** |
---|
| 392 | * RFS |
---|
[9ab091e] | 393 | */ |
---|
[29e92b0] | 394 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \ |
---|
| 395 | defined(CONFIGURE_FILESYSTEM_RFS) |
---|
| 396 | #include <rtems/rtems-rfs.h> |
---|
[14fc3a77] | 397 | #define CONFIGURE_FILESYSTEM_ENTRY_RFS \ |
---|
| 398 | { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise } |
---|
[29e92b0] | 399 | #endif |
---|
| 400 | |
---|
[3c96bee] | 401 | /** |
---|
| 402 | * JFFS2 |
---|
| 403 | */ |
---|
| 404 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2) && \ |
---|
| 405 | defined(CONFIGURE_FILESYSTEM_JFFS2) |
---|
| 406 | #include <rtems/jffs2.h> |
---|
| 407 | #define CONFIGURE_FILESYSTEM_ENTRY_JFFS2 \ |
---|
| 408 | { RTEMS_FILESYSTEM_TYPE_JFFS2, rtems_jffs2_initialize } |
---|
| 409 | #endif |
---|
| 410 | |
---|
[29e92b0] | 411 | #ifdef CONFIGURE_INIT |
---|
| 412 | |
---|
[84e1742] | 413 | /** |
---|
[27f071cd] | 414 | * DEVFS variables. |
---|
[84e1742] | 415 | * |
---|
[27f071cd] | 416 | * The number of individual devices that may be registered |
---|
| 417 | * in the system or the CONFIGURE_MAXIMUM_DEVICES variable |
---|
| 418 | * is defaulted to 4 when a filesystem is enabled, unless |
---|
| 419 | * the bsp overwrides this. In which case the value is set |
---|
| 420 | * to BSP_MAXIMUM_DEVICES. |
---|
[29e92b0] | 421 | */ |
---|
[3b7c123] | 422 | #ifdef CONFIGURE_FILESYSTEM_DEVFS |
---|
[d40da79b] | 423 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
[84e1742] | 424 | #if defined(BSP_MAXIMUM_DEVICES) |
---|
| 425 | #define CONFIGURE_MAXIMUM_DEVICES BSP_MAXIMUM_DEVICES |
---|
| 426 | #else |
---|
| 427 | #define CONFIGURE_MAXIMUM_DEVICES 4 |
---|
| 428 | #endif |
---|
[d40da79b] | 429 | #endif |
---|
| 430 | #include <rtems/devfs.h> |
---|
| 431 | #endif |
---|
| 432 | |
---|
[29e92b0] | 433 | /** |
---|
| 434 | * Table termination record. |
---|
| 435 | */ |
---|
| 436 | #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL } |
---|
[43f7a90] | 437 | |
---|
[5aecf664] | 438 | #ifndef RTEMS_SCHEDSIM |
---|
[a9df916] | 439 | #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && \ |
---|
| 440 | !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 441 | int imfs_rq_memfile_bytes_per_block = |
---|
| 442 | CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK; |
---|
| 443 | #endif |
---|
| 444 | |
---|
[29e92b0] | 445 | /** |
---|
| 446 | * The default file system table. Must be terminated with the NULL entry if |
---|
| 447 | * you provide your own. |
---|
| 448 | */ |
---|
[bd5cec41] | 449 | #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
[7d01d244] | 450 | const rtems_filesystem_table_t rtems_filesystem_table[] = { |
---|
[a9df916] | 451 | #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 452 | { "/", IMFS_initialize_support }, |
---|
[29e92b0] | 453 | #endif |
---|
| 454 | #if defined(CONFIGURE_FILESYSTEM_IMFS) && \ |
---|
| 455 | defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) |
---|
| 456 | CONFIGURE_FILESYSTEM_ENTRY_IMFS, |
---|
| 457 | #endif |
---|
| 458 | #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \ |
---|
| 459 | defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) |
---|
| 460 | CONFIGURE_FILESYSTEM_ENTRY_DEVFS, |
---|
| 461 | #endif |
---|
| 462 | #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \ |
---|
| 463 | defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) |
---|
| 464 | CONFIGURE_FILESYSTEM_ENTRY_TFTPFS, |
---|
| 465 | #endif |
---|
| 466 | #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \ |
---|
| 467 | defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) |
---|
| 468 | CONFIGURE_FILESYSTEM_ENTRY_FTPFS, |
---|
| 469 | #endif |
---|
[59673224] | 470 | #if defined(CONFIGURE_FILESYSTEM_NFS) && \ |
---|
| 471 | defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) |
---|
| 472 | CONFIGURE_FILESYSTEM_ENTRY_NFS, |
---|
[29e92b0] | 473 | #endif |
---|
| 474 | #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \ |
---|
| 475 | defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) |
---|
| 476 | CONFIGURE_FILESYSTEM_ENTRY_DOSFS, |
---|
| 477 | #endif |
---|
| 478 | #if defined(CONFIGURE_FILESYSTEM_RFS) && \ |
---|
| 479 | defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) |
---|
| 480 | CONFIGURE_FILESYSTEM_ENTRY_RFS, |
---|
| 481 | #endif |
---|
[3c96bee] | 482 | #if defined(CONFIGURE_FILESYSTEM_JFFS2) && \ |
---|
| 483 | defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2) |
---|
| 484 | CONFIGURE_FILESYSTEM_ENTRY_JFFS2, |
---|
| 485 | #endif |
---|
[29e92b0] | 486 | CONFIGURE_FILESYSTEM_NULL |
---|
| 487 | }; |
---|
[43f7a90] | 488 | |
---|
[3b7c123] | 489 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 490 | static devFS_node devFS_root_filesystem_nodes [CONFIGURE_MAXIMUM_DEVICES]; |
---|
| 491 | static const devFS_data devFS_root_filesystem_data = { |
---|
| 492 | devFS_root_filesystem_nodes, |
---|
| 493 | CONFIGURE_MAXIMUM_DEVICES |
---|
| 494 | }; |
---|
[a9df916] | 495 | #else |
---|
| 496 | static IMFS_fs_info_t _Configure_IMFS_fs_info; |
---|
| 497 | |
---|
| 498 | static const rtems_filesystem_operations_table _Configure_IMFS_ops = { |
---|
| 499 | rtems_filesystem_default_lock, |
---|
| 500 | rtems_filesystem_default_unlock, |
---|
| 501 | IMFS_eval_path, |
---|
| 502 | #ifdef CONFIGURE_IMFS_DISABLE_LINK |
---|
| 503 | rtems_filesystem_default_link, |
---|
| 504 | #else |
---|
| 505 | IMFS_link, |
---|
| 506 | #endif |
---|
| 507 | rtems_filesystem_default_are_nodes_equal, |
---|
| 508 | #ifdef CONFIGURE_IMFS_DISABLE_MKNOD |
---|
| 509 | rtems_filesystem_default_mknod, |
---|
| 510 | #else |
---|
| 511 | IMFS_mknod, |
---|
| 512 | #endif |
---|
| 513 | #ifdef CONFIGURE_IMFS_DISABLE_RMNOD |
---|
| 514 | rtems_filesystem_default_rmnod, |
---|
| 515 | #else |
---|
| 516 | IMFS_rmnod, |
---|
| 517 | #endif |
---|
[249766c5] | 518 | #ifdef CONFIGURE_IMFS_DISABLE_CHMOD |
---|
[a9df916] | 519 | rtems_filesystem_default_fchmod, |
---|
| 520 | #else |
---|
| 521 | IMFS_fchmod, |
---|
| 522 | #endif |
---|
| 523 | #ifdef CONFIGURE_IMFS_DISABLE_CHOWN |
---|
| 524 | rtems_filesystem_default_chown, |
---|
| 525 | #else |
---|
| 526 | IMFS_chown, |
---|
| 527 | #endif |
---|
| 528 | IMFS_node_clone, |
---|
| 529 | IMFS_node_free, |
---|
| 530 | #ifdef CONFIGURE_IMFS_DISABLE_MOUNT |
---|
| 531 | rtems_filesystem_default_mount, |
---|
| 532 | #else |
---|
| 533 | IMFS_mount, |
---|
| 534 | #endif |
---|
| 535 | #ifdef CONFIGURE_IMFS_DISABLE_UNMOUNT |
---|
| 536 | rtems_filesystem_default_unmount, |
---|
| 537 | #else |
---|
| 538 | IMFS_unmount, |
---|
| 539 | #endif |
---|
| 540 | rtems_filesystem_default_fsunmount, |
---|
| 541 | #ifdef CONFIGURE_IMFS_DISABLE_UTIME |
---|
| 542 | rtems_filesystem_default_utime, |
---|
| 543 | #else |
---|
| 544 | IMFS_utime, |
---|
| 545 | #endif |
---|
| 546 | #ifdef CONFIGURE_IMFS_DISABLE_SYMLINK |
---|
| 547 | rtems_filesystem_default_symlink, |
---|
| 548 | #else |
---|
| 549 | IMFS_symlink, |
---|
| 550 | #endif |
---|
| 551 | #ifdef CONFIGURE_IMFS_DISABLE_READLINK |
---|
| 552 | rtems_filesystem_default_readlink, |
---|
| 553 | #else |
---|
| 554 | IMFS_readlink, |
---|
| 555 | #endif |
---|
| 556 | #ifdef CONFIGURE_IMFS_DISABLE_RENAME |
---|
| 557 | rtems_filesystem_default_rename, |
---|
| 558 | #else |
---|
| 559 | IMFS_rename, |
---|
| 560 | #endif |
---|
| 561 | rtems_filesystem_default_statvfs |
---|
| 562 | }; |
---|
| 563 | |
---|
| 564 | static const IMFS_mknod_controls _Configure_IMFS_mknod_controls = { |
---|
[f785492] | 565 | #ifdef CONFIGURE_IMFS_DISABLE_READDIR |
---|
| 566 | &IMFS_mknod_control_dir_minimal, |
---|
| 567 | #else |
---|
| 568 | &IMFS_mknod_control_dir_default, |
---|
| 569 | #endif |
---|
[a9df916] | 570 | &IMFS_mknod_control_device, |
---|
[40a18d7f] | 571 | #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_FILE |
---|
| 572 | &IMFS_mknod_control_enosys, |
---|
| 573 | #else |
---|
| 574 | &IMFS_mknod_control_memfile, |
---|
| 575 | #endif |
---|
[6f6091b3] | 576 | #ifdef CONFIGURE_IMFS_ENABLE_MKFIFO |
---|
[a9df916] | 577 | &IMFS_mknod_control_fifo |
---|
| 578 | #else |
---|
| 579 | &IMFS_mknod_control_enosys |
---|
| 580 | #endif |
---|
| 581 | }; |
---|
| 582 | |
---|
| 583 | static const IMFS_mount_data _Configure_IMFS_mount_data = { |
---|
| 584 | &_Configure_IMFS_fs_info, |
---|
| 585 | &_Configure_IMFS_ops, |
---|
| 586 | &_Configure_IMFS_mknod_controls |
---|
| 587 | }; |
---|
[3b7c123] | 588 | #endif |
---|
[a9df916] | 589 | |
---|
[3b7c123] | 590 | const rtems_filesystem_mount_configuration |
---|
| 591 | rtems_filesystem_root_configuration = { |
---|
| 592 | NULL, |
---|
| 593 | NULL, |
---|
[46969df] | 594 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
[14fc3a77] | 595 | RTEMS_FILESYSTEM_TYPE_DEVFS, |
---|
[3b7c123] | 596 | #else |
---|
[a9df916] | 597 | "/", |
---|
[c3db01d0] | 598 | #endif |
---|
| 599 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
[3b7c123] | 600 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 601 | &devFS_root_filesystem_data |
---|
| 602 | #else |
---|
[a9df916] | 603 | &_Configure_IMFS_mount_data |
---|
[3b7c123] | 604 | #endif |
---|
[c3db01d0] | 605 | }; |
---|
| 606 | #endif |
---|
[29e92b0] | 607 | |
---|
[43f7a90] | 608 | #endif |
---|
[5aecf664] | 609 | #endif |
---|
[bfe6391] | 610 | /**@}*/ /* end of file system group */ |
---|
[43f7a90] | 611 | |
---|
[4afd6f4] | 612 | /* |
---|
[b2b56cb9] | 613 | * STACK_CHECKER_ON was still available in 4.9 so give a warning for now. |
---|
[4afd6f4] | 614 | */ |
---|
| 615 | #if defined(STACK_CHECKER_ON) |
---|
| 616 | #define CONFIGURE_STACK_CHECKER_ENABLED |
---|
| 617 | #warning "STACK_CHECKER_ON deprecated -- use CONFIGURE_STACK_CHECKER_ENABLED" |
---|
| 618 | #endif |
---|
[28352fae] | 619 | |
---|
[80f9d77] | 620 | /** |
---|
[27f071cd] | 621 | * @brief Maximum priority configuration. |
---|
[80f9d77] | 622 | * |
---|
[27f071cd] | 623 | * This configures the maximum priority value that |
---|
| 624 | * a task may have. |
---|
[80f9d77] | 625 | * |
---|
[27f071cd] | 626 | * The following applies to the data space requirements |
---|
| 627 | * of the Priority Scheduler. |
---|
[010192d] | 628 | * |
---|
[27f071cd] | 629 | * By reducing the number of priorities in a system, |
---|
| 630 | * the amount of RAM required by RTEMS can be significantly |
---|
| 631 | * reduced. RTEMS allocates a Chain_Control structure per |
---|
| 632 | * priority and this structure contains 3 pointers. So |
---|
| 633 | * the default is (256 * 12) = 3K on 32-bit architectures. |
---|
[80f9d77] | 634 | * |
---|
[27f071cd] | 635 | * This must be one less than a power of 2 between |
---|
| 636 | * 4 and 256. Valid values along with the application |
---|
| 637 | * priority levels and memory saved when pointers are |
---|
| 638 | * 32-bits in size are: |
---|
[80f9d77] | 639 | * |
---|
[27f071cd] | 640 | * + 3, 2 application priorities, 3024 bytes saved |
---|
| 641 | * + 7, 5 application priorities, 2976 bytes saved |
---|
| 642 | * + 15, 13 application priorities, 2880 bytes saved |
---|
| 643 | * + 31, 29 application priorities, 2688 bytes saved |
---|
| 644 | * + 63, 61 application priorities, 2304 bytes saved |
---|
| 645 | * + 127, 125 application priorities, 1536 bytes saved |
---|
| 646 | * + 255, 253 application priorities, 0 bytes saved |
---|
[80f9d77] | 647 | * |
---|
[27f071cd] | 648 | * It is specified in terms of Classic API priority values. |
---|
[80f9d77] | 649 | */ |
---|
| 650 | #ifndef CONFIGURE_MAXIMUM_PRIORITY |
---|
[8f25cec] | 651 | #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM |
---|
[80f9d77] | 652 | #endif |
---|
| 653 | |
---|
[bfe6391] | 654 | /** |
---|
| 655 | * @defgroup ConfigScheduler Scheduler configuration |
---|
| 656 | * |
---|
| 657 | * @ingroup Configuration |
---|
[0faa9dad] | 658 | * |
---|
[9ab091e] | 659 | * The scheduler configuration allows an application to select the |
---|
[0faa9dad] | 660 | * scheduling policy to use. The supported configurations are: |
---|
[bfe6391] | 661 | * |
---|
| 662 | * - CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler |
---|
| 663 | * - CONFIGURE_SCHEDULER_PRIORITY_SMP - Deterministic Priority SMP Scheduler |
---|
| 664 | * - CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP - Deterministic |
---|
| 665 | * Priority SMP Affinity Scheduler |
---|
[981eed2] | 666 | * - CONFIGURE_SCHEDULER_STRONG_APA - Strong APA Scheduler |
---|
[bfe6391] | 667 | * - CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler |
---|
| 668 | * - CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler |
---|
| 669 | * - CONFIGURE_SCHEDULER_EDF - EDF Scheduler |
---|
[f3d9f228] | 670 | * - CONFIGURE_SCHEDULER_EDF_SMP - EDF SMP Scheduler |
---|
[bfe6391] | 671 | * - CONFIGURE_SCHEDULER_CBS - CBS Scheduler |
---|
| 672 | * - CONFIGURE_SCHEDULER_USER - user provided scheduler |
---|
| 673 | * |
---|
| 674 | * If no configuration is specified by the application in a uniprocessor |
---|
| 675 | * configuration, then CONFIGURE_SCHEDULER_PRIORITY is the default. |
---|
| 676 | * |
---|
| 677 | * If no configuration is specified by the application in SMP |
---|
| 678 | * configuration, then CONFIGURE_SCHEDULER_PRIORITY_SMP is the default. |
---|
[0faa9dad] | 679 | * |
---|
| 680 | * An application can define its own scheduling policy by defining |
---|
[010192d] | 681 | * CONFIGURE_SCHEDULER_USER and the following: |
---|
[bfe6391] | 682 | * |
---|
[2ef85b1] | 683 | * - CONFIGURE_SCHEDULER |
---|
| 684 | * - CONFIGURE_SCHEDULER_TABLE_ENTRIES |
---|
[69aa3349] | 685 | * - CONFIGURE_SCHEDULER_USER_PER_THREAD |
---|
[0faa9dad] | 686 | */ |
---|
[ba7bc099] | 687 | |
---|
[2ef85b1] | 688 | #ifdef CONFIGURE_SCHEDULER_CONTEXT |
---|
| 689 | #warning "CONFIGURE_SCHEDULER_CONTEXT has been renamed to CONFIGURE_SCHEDULER since RTEMS 5.1" |
---|
| 690 | #define CONFIGURE_SCHEDULER CONFIGURE_SCHEDULER_CONTEXT |
---|
| 691 | #endif |
---|
| 692 | |
---|
| 693 | #ifdef CONFIGURE_SCHEDULER_CONTROLS |
---|
| 694 | #warning "CONFIGURE_SCHEDULER_CONTROLS has been renamed to CONFIGURE_SCHEDULER_TABLE_ENTRIES since RTEMS 5.1" |
---|
| 695 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES CONFIGURE_SCHEDULER_CONTROLS |
---|
| 696 | #endif |
---|
| 697 | |
---|
| 698 | #ifdef CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS |
---|
| 699 | #warning "CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS has been renamed to CONFIGURE_SCHEDULER_ASSIGNMENTS since RTEMS 5.1" |
---|
| 700 | #define CONFIGURE_SCHEDULER_ASSIGNMENTS CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS |
---|
| 701 | #endif |
---|
| 702 | |
---|
[0faa9dad] | 703 | #if !defined(CONFIGURE_SCHEDULER_USER) && \ |
---|
[0118ed6] | 704 | !defined(CONFIGURE_SCHEDULER_PRIORITY) && \ |
---|
[99b3505] | 705 | !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) && \ |
---|
[6d24e8b] | 706 | !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) && \ |
---|
[981eed2] | 707 | !defined(CONFIGURE_SCHEDULER_STRONG_APA) && \ |
---|
[ba7bc099] | 708 | !defined(CONFIGURE_SCHEDULER_SIMPLE) && \ |
---|
[5472ad41] | 709 | !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \ |
---|
[82db8e56] | 710 | !defined(CONFIGURE_SCHEDULER_EDF) && \ |
---|
[f3d9f228] | 711 | !defined(CONFIGURE_SCHEDULER_EDF_SMP) && \ |
---|
[82db8e56] | 712 | !defined(CONFIGURE_SCHEDULER_CBS) |
---|
[334e1d2] | 713 | #if defined(RTEMS_SMP) && _CONFIGURE_MAXIMUM_PROCESSORS > 1 |
---|
[bfe6391] | 714 | /** |
---|
| 715 | * If no scheduler is specified in an SMP configuration, the |
---|
[21389c06] | 716 | * EDF scheduler is default. |
---|
[bfe6391] | 717 | */ |
---|
[21389c06] | 718 | #define CONFIGURE_SCHEDULER_EDF_SMP |
---|
[ba7bc099] | 719 | #else |
---|
[bfe6391] | 720 | /** |
---|
| 721 | * If no scheduler is specified in a uniprocessor configuration, the |
---|
| 722 | * priority scheduler is default. |
---|
| 723 | */ |
---|
[ba7bc099] | 724 | #define CONFIGURE_SCHEDULER_PRIORITY |
---|
| 725 | #endif |
---|
[0faa9dad] | 726 | #endif |
---|
| 727 | |
---|
[e1598a6] | 728 | #include <rtems/scheduler.h> |
---|
| 729 | |
---|
[9ab091e] | 730 | /* |
---|
[4c794c8] | 731 | * If the Priority Scheduler is selected, then configure for it. |
---|
[0faa9dad] | 732 | */ |
---|
| 733 | #if defined(CONFIGURE_SCHEDULER_PRIORITY) |
---|
[133d54c5] | 734 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 735 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 736 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'D', ' ') |
---|
| 737 | #endif |
---|
| 738 | |
---|
[2ef85b1] | 739 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 740 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 741 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 742 | RTEMS_SCHEDULER_PRIORITY( \ |
---|
[e1598a6] | 743 | dflt, \ |
---|
| 744 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 745 | ) |
---|
| 746 | |
---|
[bfe6391] | 747 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 748 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 749 | RTEMS_SCHEDULER_TABLE_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 750 | #endif |
---|
[0faa9dad] | 751 | #endif |
---|
| 752 | |
---|
[99b3505] | 753 | /* |
---|
| 754 | * If the Deterministic Priority SMP Scheduler is selected, then configure for |
---|
| 755 | * it. |
---|
| 756 | */ |
---|
| 757 | #if defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) |
---|
[133d54c5] | 758 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 759 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 760 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'D', ' ') |
---|
| 761 | #endif |
---|
| 762 | |
---|
[2ef85b1] | 763 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 764 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 765 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 766 | RTEMS_SCHEDULER_PRIORITY_SMP( \ |
---|
[e1598a6] | 767 | dflt, \ |
---|
| 768 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 769 | ) |
---|
| 770 | |
---|
[bfe6391] | 771 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 772 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 773 | RTEMS_SCHEDULER_TABLE_PRIORITY_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 774 | #endif |
---|
[99b3505] | 775 | #endif |
---|
| 776 | |
---|
[6d24e8b] | 777 | /* |
---|
| 778 | * If the Deterministic Priority Affinity SMP Scheduler is selected, then configure for |
---|
| 779 | * it. |
---|
| 780 | */ |
---|
| 781 | #if defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) |
---|
[133d54c5] | 782 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 783 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 784 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'A', ' ') |
---|
| 785 | #endif |
---|
| 786 | |
---|
[2ef85b1] | 787 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 788 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 789 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 790 | RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( \ |
---|
[e1598a6] | 791 | dflt, \ |
---|
| 792 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 793 | ) |
---|
| 794 | |
---|
[7dfb4b9] | 795 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 796 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 797 | RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( \ |
---|
[133d54c5] | 798 | dflt, \ |
---|
| 799 | CONFIGURE_SCHEDULER_NAME \ |
---|
| 800 | ) |
---|
[e1598a6] | 801 | #endif |
---|
[6d24e8b] | 802 | #endif |
---|
| 803 | |
---|
[981eed2] | 804 | /* |
---|
| 805 | * If the Strong APA Scheduler is selected, then configure for |
---|
| 806 | * it. |
---|
| 807 | */ |
---|
| 808 | #if defined(CONFIGURE_SCHEDULER_STRONG_APA) |
---|
| 809 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
| 810 | /** Configure the name of the scheduler instance */ |
---|
| 811 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'A', 'P', 'A') |
---|
| 812 | #endif |
---|
| 813 | |
---|
[2ef85b1] | 814 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[981eed2] | 815 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 816 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 817 | RTEMS_SCHEDULER_STRONG_APA( \ |
---|
[981eed2] | 818 | dflt, \ |
---|
| 819 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 820 | ) |
---|
| 821 | |
---|
| 822 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 823 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 824 | RTEMS_SCHEDULER_TABLE_STRONG_APA(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[981eed2] | 825 | #endif |
---|
| 826 | #endif |
---|
| 827 | |
---|
[9ab091e] | 828 | /* |
---|
[0118ed6] | 829 | * If the Simple Priority Scheduler is selected, then configure for it. |
---|
| 830 | */ |
---|
| 831 | #if defined(CONFIGURE_SCHEDULER_SIMPLE) |
---|
[133d54c5] | 832 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 833 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 834 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'S', ' ') |
---|
| 835 | #endif |
---|
| 836 | |
---|
[2ef85b1] | 837 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 838 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 839 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_SIMPLE(dflt) |
---|
[e1598a6] | 840 | |
---|
[bfe6391] | 841 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 842 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 843 | RTEMS_SCHEDULER_TABLE_SIMPLE(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 844 | #endif |
---|
[0118ed6] | 845 | #endif |
---|
| 846 | |
---|
[ba7bc099] | 847 | /* |
---|
| 848 | * If the Simple SMP Priority Scheduler is selected, then configure for it. |
---|
| 849 | */ |
---|
| 850 | #if defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) |
---|
[133d54c5] | 851 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 852 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 853 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'S', ' ') |
---|
| 854 | #endif |
---|
| 855 | |
---|
[2ef85b1] | 856 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 857 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 858 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 859 | RTEMS_SCHEDULER_SIMPLE_SMP(dflt) |
---|
[e1598a6] | 860 | |
---|
[bfe6391] | 861 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 862 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 863 | RTEMS_SCHEDULER_TABLE_SIMPLE_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 864 | #endif |
---|
[ba7bc099] | 865 | #endif |
---|
| 866 | |
---|
[5472ad41] | 867 | /* |
---|
| 868 | * If the EDF Scheduler is selected, then configure for it. |
---|
| 869 | */ |
---|
| 870 | #if defined(CONFIGURE_SCHEDULER_EDF) |
---|
[133d54c5] | 871 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 872 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 873 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'E', 'D', 'F') |
---|
| 874 | #endif |
---|
| 875 | |
---|
[2ef85b1] | 876 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 877 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 878 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF(dflt) |
---|
[e1598a6] | 879 | |
---|
[bfe6391] | 880 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 881 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 882 | RTEMS_SCHEDULER_TABLE_EDF(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 883 | #endif |
---|
[5472ad41] | 884 | #endif |
---|
| 885 | |
---|
[f3d9f228] | 886 | /* |
---|
| 887 | * If the EDF SMP Scheduler is selected, then configure for it. |
---|
| 888 | */ |
---|
| 889 | #if defined(CONFIGURE_SCHEDULER_EDF_SMP) |
---|
| 890 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
| 891 | /** Configure the name of the scheduler instance */ |
---|
| 892 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'E', 'D', 'F') |
---|
| 893 | #endif |
---|
| 894 | |
---|
[2ef85b1] | 895 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[f3d9f228] | 896 | /** Configure the context needed by the scheduler instance */ |
---|
[806fe963] | 897 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF_SMP(dflt) |
---|
[f3d9f228] | 898 | |
---|
| 899 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 900 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 901 | RTEMS_SCHEDULER_TABLE_EDF_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[f3d9f228] | 902 | #endif |
---|
| 903 | #endif |
---|
| 904 | |
---|
[82db8e56] | 905 | /* |
---|
| 906 | * If the CBS Scheduler is selected, then configure for it. |
---|
| 907 | */ |
---|
| 908 | #if defined(CONFIGURE_SCHEDULER_CBS) |
---|
[133d54c5] | 909 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 910 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 911 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'C', 'B', 'S') |
---|
| 912 | #endif |
---|
| 913 | |
---|
[2ef85b1] | 914 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 915 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 916 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CBS(dflt) |
---|
[e1598a6] | 917 | |
---|
[bfe6391] | 918 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 919 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 920 | RTEMS_SCHEDULER_TABLE_CBS(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 921 | #endif |
---|
[82db8e56] | 922 | |
---|
| 923 | #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS |
---|
| 924 | #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS |
---|
| 925 | #endif |
---|
| 926 | |
---|
| 927 | #ifdef CONFIGURE_INIT |
---|
[e1598a6] | 928 | const uint32_t _Scheduler_CBS_Maximum_servers = |
---|
| 929 | CONFIGURE_CBS_MAXIMUM_SERVERS; |
---|
| 930 | |
---|
| 931 | Scheduler_CBS_Server |
---|
| 932 | _Scheduler_CBS_Server_list[ CONFIGURE_CBS_MAXIMUM_SERVERS ]; |
---|
[82db8e56] | 933 | #endif |
---|
| 934 | #endif |
---|
| 935 | |
---|
[9ab091e] | 936 | /* |
---|
[010192d] | 937 | * Set up the scheduler entry points table. The scheduling code uses |
---|
| 938 | * this code to know which scheduler is configured by the user. |
---|
[0faa9dad] | 939 | */ |
---|
| 940 | #ifdef CONFIGURE_INIT |
---|
[2ef85b1] | 941 | #if defined(CONFIGURE_SCHEDULER) |
---|
| 942 | CONFIGURE_SCHEDULER; |
---|
[133d54c5] | 943 | #endif |
---|
[e1598a6] | 944 | |
---|
| 945 | const Scheduler_Control _Scheduler_Table[] = { |
---|
[2ef85b1] | 946 | CONFIGURE_SCHEDULER_TABLE_ENTRIES |
---|
[0faa9dad] | 947 | }; |
---|
[1fac361] | 948 | |
---|
[61d5c886] | 949 | #define _CONFIGURE_SCHEDULER_COUNT RTEMS_ARRAY_SIZE( _Scheduler_Table ) |
---|
[3995e6d] | 950 | |
---|
[e1598a6] | 951 | #if defined(RTEMS_SMP) |
---|
[61d5c886] | 952 | const size_t _Scheduler_Count = _CONFIGURE_SCHEDULER_COUNT; |
---|
[c5831a3f] | 953 | |
---|
[e610785] | 954 | const Scheduler_Assignment _Scheduler_Initial_assignments[] = { |
---|
[2ef85b1] | 955 | #if defined(CONFIGURE_SCHEDULER_ASSIGNMENTS) |
---|
| 956 | CONFIGURE_SCHEDULER_ASSIGNMENTS |
---|
[c5831a3f] | 957 | #else |
---|
[2ef85b1] | 958 | #define _CONFIGURE_SCHEDULER_ASSIGN \ |
---|
[c5831a3f] | 959 | RTEMS_SCHEDULER_ASSIGN( \ |
---|
| 960 | 0, \ |
---|
| 961 | RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \ |
---|
| 962 | ) |
---|
[2ef85b1] | 963 | _CONFIGURE_SCHEDULER_ASSIGN |
---|
[334e1d2] | 964 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 2 |
---|
[2ef85b1] | 965 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 966 | #endif |
---|
[334e1d2] | 967 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 3 |
---|
[2ef85b1] | 968 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 969 | #endif |
---|
[334e1d2] | 970 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 4 |
---|
[2ef85b1] | 971 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 972 | #endif |
---|
[334e1d2] | 973 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 5 |
---|
[2ef85b1] | 974 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 975 | #endif |
---|
[334e1d2] | 976 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 6 |
---|
[2ef85b1] | 977 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 978 | #endif |
---|
[334e1d2] | 979 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 7 |
---|
[2ef85b1] | 980 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 981 | #endif |
---|
[334e1d2] | 982 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 8 |
---|
[2ef85b1] | 983 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 984 | #endif |
---|
[334e1d2] | 985 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 9 |
---|
[2ef85b1] | 986 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 987 | #endif |
---|
[334e1d2] | 988 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 10 |
---|
[2ef85b1] | 989 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 990 | #endif |
---|
[334e1d2] | 991 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 11 |
---|
[2ef85b1] | 992 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 993 | #endif |
---|
[334e1d2] | 994 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 12 |
---|
[2ef85b1] | 995 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 996 | #endif |
---|
[334e1d2] | 997 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 13 |
---|
[2ef85b1] | 998 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 999 | #endif |
---|
[334e1d2] | 1000 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 14 |
---|
[2ef85b1] | 1001 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1002 | #endif |
---|
[334e1d2] | 1003 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 15 |
---|
[2ef85b1] | 1004 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1005 | #endif |
---|
[334e1d2] | 1006 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 16 |
---|
[2ef85b1] | 1007 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1008 | #endif |
---|
[334e1d2] | 1009 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 17 |
---|
[2ef85b1] | 1010 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1011 | #endif |
---|
[334e1d2] | 1012 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 18 |
---|
[2ef85b1] | 1013 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1014 | #endif |
---|
[334e1d2] | 1015 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 19 |
---|
[2ef85b1] | 1016 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1017 | #endif |
---|
[334e1d2] | 1018 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 20 |
---|
[2ef85b1] | 1019 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1020 | #endif |
---|
[334e1d2] | 1021 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 21 |
---|
[2ef85b1] | 1022 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1023 | #endif |
---|
[334e1d2] | 1024 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 22 |
---|
[2ef85b1] | 1025 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1026 | #endif |
---|
[334e1d2] | 1027 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 23 |
---|
[2ef85b1] | 1028 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1029 | #endif |
---|
[334e1d2] | 1030 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 24 |
---|
[2ef85b1] | 1031 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1032 | #endif |
---|
[334e1d2] | 1033 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 25 |
---|
[2ef85b1] | 1034 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1035 | #endif |
---|
[334e1d2] | 1036 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 26 |
---|
[2ef85b1] | 1037 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1038 | #endif |
---|
[334e1d2] | 1039 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 27 |
---|
[2ef85b1] | 1040 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1041 | #endif |
---|
[334e1d2] | 1042 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 28 |
---|
[2ef85b1] | 1043 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1044 | #endif |
---|
[334e1d2] | 1045 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 29 |
---|
[2ef85b1] | 1046 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1047 | #endif |
---|
[334e1d2] | 1048 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 30 |
---|
[2ef85b1] | 1049 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1050 | #endif |
---|
[334e1d2] | 1051 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 31 |
---|
[2ef85b1] | 1052 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1053 | #endif |
---|
[334e1d2] | 1054 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 32 |
---|
[2ef85b1] | 1055 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1056 | #endif |
---|
[2ef85b1] | 1057 | #undef _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1058 | #endif |
---|
| 1059 | }; |
---|
| 1060 | |
---|
| 1061 | RTEMS_STATIC_ASSERT( |
---|
[334e1d2] | 1062 | _CONFIGURE_MAXIMUM_PROCESSORS |
---|
[e610785] | 1063 | == RTEMS_ARRAY_SIZE( _Scheduler_Initial_assignments ), |
---|
| 1064 | _Scheduler_Initial_assignments |
---|
[c5831a3f] | 1065 | ); |
---|
[e1598a6] | 1066 | #endif |
---|
[0faa9dad] | 1067 | #endif |
---|
[bfe6391] | 1068 | /**@}*/ /* end of Scheduler Configuration */ |
---|
| 1069 | |
---|
| 1070 | /** |
---|
| 1071 | * @defgroup ConfigurationIdle IDLE Thread Configuration |
---|
| 1072 | * |
---|
| 1073 | * @addtogroup Configuration |
---|
| 1074 | * |
---|
| 1075 | * This module contains configuration parameters related to the |
---|
| 1076 | * set of IDLE threads. On a uniprocessor system, there is one |
---|
| 1077 | * IDLE thread. On an SMP system, there is one for each core. |
---|
| 1078 | */ |
---|
[0faa9dad] | 1079 | |
---|
[80f9d77] | 1080 | /* |
---|
| 1081 | * If you said the IDLE task was going to do application initialization |
---|
| 1082 | * and didn't override the IDLE body, then something is amiss. |
---|
| 1083 | */ |
---|
| 1084 | #if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \ |
---|
| 1085 | !defined(CONFIGURE_IDLE_TASK_BODY)) |
---|
[805cddc] | 1086 | #error "CONFIGURE_ERROR: You did not override the IDLE task body." |
---|
[80f9d77] | 1087 | #endif |
---|
| 1088 | |
---|
[5877cc3a] | 1089 | /** |
---|
[27f071cd] | 1090 | * @brief Idle task body configuration. |
---|
[976162a6] | 1091 | * |
---|
[27f071cd] | 1092 | * There is a default IDLE thread body provided by RTEMS which |
---|
| 1093 | * has the possibility of being CPU specific. There may be a |
---|
| 1094 | * BSP specific override of the RTEMS default body and in turn, |
---|
| 1095 | * the application may override and provide its own. |
---|
[976162a6] | 1096 | */ |
---|
| 1097 | #ifndef CONFIGURE_IDLE_TASK_BODY |
---|
[6c71b25] | 1098 | #if defined(BSP_IDLE_TASK_BODY) |
---|
[976162a6] | 1099 | #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY |
---|
| 1100 | #else |
---|
[8776bb9] | 1101 | #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body |
---|
[976162a6] | 1102 | #endif |
---|
| 1103 | #endif |
---|
[bfe6391] | 1104 | /**@}*/ /* end of IDLE thread configuration */ |
---|
| 1105 | |
---|
| 1106 | /** |
---|
| 1107 | * @defgroup ConfigurationStackSize Configuration Thread Stack Size |
---|
| 1108 | * |
---|
| 1109 | * @addtogroup Configuration |
---|
| 1110 | * |
---|
[0446f680] | 1111 | * This module contains parameters related to thread and interrupt stacks. |
---|
[bfe6391] | 1112 | */ |
---|
[976162a6] | 1113 | |
---|
[ecf0f4c] | 1114 | /** |
---|
[27f071cd] | 1115 | * By default, use the minimum stack size requested by this port. |
---|
[ecf0f4c] | 1116 | */ |
---|
| 1117 | #ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 1118 | #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
| 1119 | #endif |
---|
| 1120 | |
---|
[bfe6391] | 1121 | /** |
---|
| 1122 | * This specifies the default POSIX thread stack size. By default, it is |
---|
| 1123 | * twice that recommended for the port. |
---|
| 1124 | */ |
---|
[fd27bae] | 1125 | #ifndef CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE |
---|
[b4f635e] | 1126 | #define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE \ |
---|
| 1127 | (2 * CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[fd27bae] | 1128 | #endif |
---|
[b4f635e] | 1129 | |
---|
[5877cc3a] | 1130 | /** |
---|
[27f071cd] | 1131 | * @brief Idle task stack size configuration. |
---|
[976162a6] | 1132 | * |
---|
[27f071cd] | 1133 | * By default, the IDLE task will have a stack of minimum size. |
---|
| 1134 | * The BSP or application may override this value. |
---|
[976162a6] | 1135 | */ |
---|
| 1136 | #ifndef CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 1137 | #ifdef BSP_IDLE_TASK_STACK_SIZE |
---|
| 1138 | #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE |
---|
| 1139 | #else |
---|
[ecf0f4c] | 1140 | #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[976162a6] | 1141 | #endif |
---|
| 1142 | #endif |
---|
[b4f635e] | 1143 | #if CONFIGURE_IDLE_TASK_STACK_SIZE < CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 1144 | #error "CONFIGURE_IDLE_TASK_STACK_SIZE less than CONFIGURE_MINIMUM_TASK_STACK_SIZE" |
---|
| 1145 | #endif |
---|
[976162a6] | 1146 | |
---|
[511dc4b] | 1147 | /* |
---|
| 1148 | * Interrupt stack configuration. |
---|
[6aa25da] | 1149 | * |
---|
[27f071cd] | 1150 | * By default, the interrupt stack will be of minimum size. |
---|
| 1151 | * The BSP or application may override this value. |
---|
[6aa25da] | 1152 | */ |
---|
[511dc4b] | 1153 | |
---|
[6aa25da] | 1154 | #ifndef CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 1155 | #ifdef BSP_INTERRUPT_STACK_SIZE |
---|
| 1156 | #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE |
---|
| 1157 | #else |
---|
[24b5807] | 1158 | #define CONFIGURE_INTERRUPT_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
[6aa25da] | 1159 | #endif |
---|
| 1160 | #endif |
---|
| 1161 | |
---|
[511dc4b] | 1162 | #if CONFIGURE_INTERRUPT_STACK_SIZE % CPU_INTERRUPT_STACK_ALIGNMENT != 0 |
---|
| 1163 | #error "CONFIGURE_INTERRUPT_STACK_SIZE fails to meet the CPU port interrupt stack alignment" |
---|
| 1164 | #endif |
---|
| 1165 | |
---|
| 1166 | #ifdef CONFIGURE_INIT |
---|
| 1167 | RTEMS_DEFINE_GLOBAL_SYMBOL( |
---|
[ff081aee] | 1168 | _ISR_Stack_size, |
---|
[511dc4b] | 1169 | CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 1170 | ); |
---|
| 1171 | |
---|
[ff081aee] | 1172 | char _ISR_Stack_area_begin[ |
---|
[334e1d2] | 1173 | _CONFIGURE_MAXIMUM_PROCESSORS * CONFIGURE_INTERRUPT_STACK_SIZE |
---|
[511dc4b] | 1174 | ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) |
---|
| 1175 | RTEMS_SECTION( ".rtemsstack.interrupt.begin" ); |
---|
| 1176 | |
---|
[a7c86cc] | 1177 | RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( |
---|
| 1178 | _ISR_Stack_area_end, |
---|
| 1179 | ".rtemsstack.interrupt.end" |
---|
| 1180 | ); |
---|
[6aa25da] | 1181 | #endif |
---|
| 1182 | |
---|
[bfe6391] | 1183 | /** |
---|
| 1184 | * @addtogroup Configuration |
---|
| 1185 | */ |
---|
| 1186 | /**@{*/ |
---|
[976162a6] | 1187 | |
---|
[bfe6391] | 1188 | /** |
---|
| 1189 | * @defgroup ConfigurationMalloc RTEMS Malloc configuration |
---|
| 1190 | * |
---|
| 1191 | * This module contains parameters related to configuration of the RTEMS |
---|
| 1192 | * Malloc implementation. |
---|
[cfcc4e20] | 1193 | */ |
---|
[bfe6391] | 1194 | /**@{*/ |
---|
[cfcc4e20] | 1195 | #include <rtems/malloc.h> |
---|
| 1196 | |
---|
| 1197 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1198 | /** |
---|
[27f071cd] | 1199 | * This configures the sbrk() support for the malloc family. |
---|
| 1200 | * By default it is assumed that the BSP provides all available |
---|
| 1201 | * RAM to the malloc family implementation so sbrk()'ing to get |
---|
| 1202 | * more memory would always fail anyway. |
---|
[5877cc3a] | 1203 | */ |
---|
[47a3cd8] | 1204 | const rtems_heap_extend_handler rtems_malloc_extend_handler = |
---|
| 1205 | #ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 1206 | rtems_heap_extend_via_sbrk; |
---|
[cfcc4e20] | 1207 | #else |
---|
[47a3cd8] | 1208 | rtems_heap_null_extend; |
---|
[cfcc4e20] | 1209 | #endif |
---|
| 1210 | #endif |
---|
| 1211 | |
---|
[bfc54b0] | 1212 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1213 | /** |
---|
[27f071cd] | 1214 | * This configures the malloc family plugin which dirties memory |
---|
| 1215 | * allocated. This is helpful for finding unitialized data structure |
---|
| 1216 | * problems. |
---|
[5877cc3a] | 1217 | */ |
---|
[0de235f9] | 1218 | rtems_malloc_dirtier_t rtems_malloc_dirty_helper = |
---|
[bfc54b0] | 1219 | #if defined(CONFIGURE_MALLOC_DIRTY) |
---|
| 1220 | rtems_malloc_dirty_memory; |
---|
| 1221 | #else |
---|
| 1222 | NULL; |
---|
| 1223 | #endif |
---|
| 1224 | #endif |
---|
[bfe6391] | 1225 | /**@}*/ /* end of Malloc Configuration */ |
---|
| 1226 | |
---|
| 1227 | /** |
---|
| 1228 | * @defgroup ConfigurationHelpers Configuration Helpers |
---|
| 1229 | * |
---|
| 1230 | * @ingroup Configuration |
---|
| 1231 | * |
---|
| 1232 | * This module contains items which are used internally to ease |
---|
| 1233 | * the configuration calculations. |
---|
| 1234 | */ |
---|
| 1235 | /**@{*/ |
---|
[bfc54b0] | 1236 | |
---|
[6e4c01e] | 1237 | /** |
---|
| 1238 | * Zero of one returns 0 if the parameter is 0 else 1 is returned. |
---|
| 1239 | */ |
---|
[3ef7e744] | 1240 | #define _Configure_Zero_or_One(_number) ((_number) != 0 ? 1 : 0) |
---|
[6e4c01e] | 1241 | |
---|
[bfe6391] | 1242 | /** |
---|
[25e28d8] | 1243 | * General helper to align up a value. |
---|
[bfe6391] | 1244 | */ |
---|
[fb9e98e] | 1245 | #define _Configure_Align_up(_val, _align) \ |
---|
[25e28d8] | 1246 | (((_val) + (_align) - 1) - ((_val) + (_align) - 1) % (_align)) |
---|
| 1247 | |
---|
[07d71279] | 1248 | #define _CONFIGURE_HEAP_MIN_BLOCK_SIZE \ |
---|
[25e28d8] | 1249 | _Configure_Align_up(sizeof(Heap_Block), CPU_HEAP_ALIGNMENT) |
---|
[fb9e98e] | 1250 | |
---|
[5877cc3a] | 1251 | /** |
---|
[27f071cd] | 1252 | * This is a helper macro used in calculations in this file. It is used |
---|
| 1253 | * to noted when an element is allocated from the RTEMS Workspace and adds |
---|
| 1254 | * a factor to account for heap overhead plus an alignment factor that |
---|
| 1255 | * may be applied. |
---|
[5877cc3a] | 1256 | */ |
---|
| 1257 | #define _Configure_From_workspace(_size) \ |
---|
[25e28d8] | 1258 | (ssize_t) (_Configure_Zero_or_One(_size) * \ |
---|
| 1259 | _Configure_Align_up(_size + HEAP_BLOCK_HEADER_SIZE, \ |
---|
[07d71279] | 1260 | _CONFIGURE_HEAP_MIN_BLOCK_SIZE)) |
---|
[5877cc3a] | 1261 | |
---|
[9fa3cf0d] | 1262 | /** |
---|
[27f071cd] | 1263 | * This is a helper macro used in stack space calculations in this file. It |
---|
| 1264 | * may be provided by the application in case a special task stack allocator |
---|
| 1265 | * is used. The default is allocation from the RTEMS Workspace. |
---|
[9fa3cf0d] | 1266 | */ |
---|
| 1267 | #ifdef CONFIGURE_TASK_STACK_FROM_ALLOCATOR |
---|
| 1268 | #define _Configure_From_stackspace(_stack_size) \ |
---|
[fc398fd] | 1269 | CONFIGURE_TASK_STACK_FROM_ALLOCATOR(_stack_size + CONTEXT_FP_SIZE) |
---|
[9fa3cf0d] | 1270 | #else |
---|
| 1271 | #define _Configure_From_stackspace(_stack_size) \ |
---|
[fc398fd] | 1272 | _Configure_From_workspace(_stack_size + CONTEXT_FP_SIZE) |
---|
[9fa3cf0d] | 1273 | #endif |
---|
| 1274 | |
---|
[dee98ce] | 1275 | /** |
---|
[27f071cd] | 1276 | * Do not use the unlimited bit as part of the multiplication |
---|
| 1277 | * for memory usage. |
---|
[dee98ce] | 1278 | */ |
---|
| 1279 | #define _Configure_Max_Objects(_max) \ |
---|
[6e4c01e] | 1280 | (_Configure_Zero_or_One(_max) * rtems_resource_maximum_per_allocation(_max)) |
---|
[bfe6391] | 1281 | /**@}*/ |
---|
[5877cc3a] | 1282 | |
---|
[bfe6391] | 1283 | /** |
---|
| 1284 | * @defgroup ConfigurationInitTasksTable Initialization Tasks Configuration |
---|
| 1285 | * |
---|
| 1286 | * @addtogroup Configuration |
---|
| 1287 | * |
---|
| 1288 | * This group contains the elements needed to define the Classic API |
---|
| 1289 | * Initialization Tasks Table. |
---|
| 1290 | * |
---|
[c232b37] | 1291 | * Default User Initialization Task Table. This table guarantees that |
---|
| 1292 | * one user initialization table is defined. |
---|
| 1293 | * |
---|
| 1294 | * WHEN CONFIGURE_HAS_OWN_INIT_TASK_TABLE is defined, the user is |
---|
| 1295 | * responsible for defining their own table information and setting the |
---|
[be1c11ed] | 1296 | * appropriate variables. |
---|
| 1297 | */ |
---|
[c232b37] | 1298 | #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 1299 | !defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE) |
---|
[08bae5e6] | 1300 | |
---|
[bfe6391] | 1301 | /** |
---|
| 1302 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1303 | * used to specify the name of the single Classic API task. |
---|
| 1304 | */ |
---|
[08bae5e6] | 1305 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
[5877cc3a] | 1306 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name('U', 'I', '1', ' ') |
---|
[08bae5e6] | 1307 | #endif |
---|
| 1308 | |
---|
[bfe6391] | 1309 | /** |
---|
| 1310 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1311 | * used to specify the stack size of the single Classic API task. |
---|
| 1312 | */ |
---|
[08bae5e6] | 1313 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
[ecf0f4c] | 1314 | #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[08bae5e6] | 1315 | #endif |
---|
| 1316 | |
---|
[bfe6391] | 1317 | /** |
---|
| 1318 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1319 | * used to specify the priority of the single Classic API task. |
---|
| 1320 | */ |
---|
[08bae5e6] | 1321 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
[5877cc3a] | 1322 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
[08bae5e6] | 1323 | #endif |
---|
| 1324 | |
---|
[bfe6391] | 1325 | /** |
---|
| 1326 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1327 | * used to specify the attributes size of the single Classic API task. |
---|
| 1328 | */ |
---|
[08bae5e6] | 1329 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
[5877cc3a] | 1330 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
[08bae5e6] | 1331 | #endif |
---|
| 1332 | |
---|
[bfe6391] | 1333 | /** |
---|
| 1334 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1335 | * used to specify the entry point of the single Classic API task. |
---|
| 1336 | */ |
---|
[08bae5e6] | 1337 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
[d8b74dbe] | 1338 | #ifdef __cplusplus |
---|
| 1339 | extern "C" { |
---|
| 1340 | #endif |
---|
| 1341 | rtems_task Init (rtems_task_argument ); |
---|
| 1342 | #ifdef __cplusplus |
---|
| 1343 | } |
---|
| 1344 | #endif |
---|
[5877cc3a] | 1345 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
[d8b74dbe] | 1346 | extern const char* bsp_boot_cmdline; |
---|
| 1347 | #define CONFIGURE_INIT_TASK_ARGUMENTS ((rtems_task_argument) &bsp_boot_cmdline) |
---|
[08bae5e6] | 1348 | #endif |
---|
| 1349 | |
---|
[bfe6391] | 1350 | /** |
---|
| 1351 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1352 | * used to specify the initial execution mode of the single Classic API task. |
---|
| 1353 | */ |
---|
[08bae5e6] | 1354 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
[f95fa387] | 1355 | #ifdef _CONFIGURE_SMP_APPLICATION |
---|
[05e82bd7] | 1356 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES |
---|
| 1357 | #else |
---|
| 1358 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
| 1359 | #endif |
---|
[08bae5e6] | 1360 | #endif |
---|
| 1361 | |
---|
[bfe6391] | 1362 | /** |
---|
| 1363 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1364 | * used to specify the initial argument to the single Classic API task. |
---|
| 1365 | */ |
---|
[08bae5e6] | 1366 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
[5877cc3a] | 1367 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
[08bae5e6] | 1368 | #endif |
---|
| 1369 | |
---|
| 1370 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1371 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 1372 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 1373 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 1374 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 1375 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 1376 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 1377 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 1378 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 1379 | } |
---|
| 1380 | }; |
---|
[08bae5e6] | 1381 | #endif |
---|
| 1382 | |
---|
[bfe6391] | 1383 | /** |
---|
| 1384 | * This is the name of the Initialization Tasks Table generated. |
---|
| 1385 | */ |
---|
[d9a0689e] | 1386 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
| 1387 | |
---|
[07d71279] | 1388 | /* |
---|
[bfe6391] | 1389 | * This is the size of the Initialization Tasks Table generated. |
---|
| 1390 | */ |
---|
[d9a0689e] | 1391 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
[9ed2bef] | 1392 | RTEMS_ARRAY_SIZE(CONFIGURE_INIT_TASK_TABLE) |
---|
[d9a0689e] | 1393 | |
---|
[be1c11ed] | 1394 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
[c232b37] | 1395 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 1396 | |
---|
| 1397 | /* |
---|
| 1398 | * The user application is responsible for defining everything |
---|
| 1399 | * when CONFIGURE_HAS_OWN_INIT_TABLE is defined. |
---|
| 1400 | */ |
---|
| 1401 | #else /* not using standard or providing own Init Task Table */ |
---|
[be1c11ed] | 1402 | |
---|
[07d71279] | 1403 | /* |
---|
[bfe6391] | 1404 | * This is the name of the Initialization Task when none is configured. |
---|
| 1405 | */ |
---|
[be1c11ed] | 1406 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
[bfe6391] | 1407 | |
---|
[07d71279] | 1408 | /* |
---|
[bfe6391] | 1409 | * This is the size of the Initialization Task when none is configured. |
---|
| 1410 | */ |
---|
[be1c11ed] | 1411 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
[bfe6391] | 1412 | |
---|
[07d71279] | 1413 | /* |
---|
[bfe6391] | 1414 | * This is the stack size of the Initialization Task when none is configured. |
---|
| 1415 | */ |
---|
[45c3da3] | 1416 | #define CONFIGURE_INIT_TASK_STACK_SIZE 0 |
---|
[be1c11ed] | 1417 | |
---|
[c232b37] | 1418 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 1419 | |
---|
[08bae5e6] | 1420 | #endif |
---|
[bfe6391] | 1421 | /**@}*/ /* end of Classic API Initialization Tasks Table */ |
---|
[08bae5e6] | 1422 | |
---|
[bfe6391] | 1423 | /** |
---|
| 1424 | * @defgroup ConfigurationDriverTable Device Driver Table Configuration |
---|
| 1425 | * |
---|
| 1426 | * @addtogroup Configuration |
---|
| 1427 | * |
---|
| 1428 | * This group contains parameters related to generating a Device Driver |
---|
| 1429 | * Table. |
---|
| 1430 | * |
---|
| 1431 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
[0446f680] | 1432 | * chosen by the application. There is always a null driver entry. |
---|
[08bae5e6] | 1433 | */ |
---|
[bfe6391] | 1434 | /**@{*/ |
---|
[08bae5e6] | 1435 | |
---|
[bfe6391] | 1436 | /** |
---|
| 1437 | * This is an empty device driver slot. |
---|
| 1438 | */ |
---|
[08bae5e6] | 1439 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 1440 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 1441 | |
---|
[337a186] | 1442 | #if (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
| 1443 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER)) || \ |
---|
| 1444 | (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
| 1445 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) || \ |
---|
| 1446 | (defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) && \ |
---|
| 1447 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) |
---|
| 1448 | #error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER, CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER, and CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER are mutually exclusive" |
---|
[ac28f15] | 1449 | #endif |
---|
| 1450 | |
---|
[df49c60] | 1451 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
[5877cc3a] | 1452 | #include <rtems/console.h> |
---|
[df49c60] | 1453 | #endif |
---|
| 1454 | |
---|
[ac28f15] | 1455 | #ifdef CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER |
---|
| 1456 | #include <rtems/console.h> |
---|
| 1457 | |
---|
| 1458 | #ifdef CONFIGURE_INIT |
---|
| 1459 | RTEMS_SYSINIT_ITEM( |
---|
| 1460 | _Console_simple_Initialize, |
---|
| 1461 | RTEMS_SYSINIT_DEVICE_DRIVERS, |
---|
[337a186] | 1462 | RTEMS_SYSINIT_ORDER_SECOND |
---|
| 1463 | ); |
---|
| 1464 | #endif |
---|
| 1465 | #endif |
---|
| 1466 | |
---|
| 1467 | #ifdef CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER |
---|
| 1468 | #include <rtems/console.h> |
---|
| 1469 | |
---|
| 1470 | #ifdef CONFIGURE_INIT |
---|
| 1471 | RTEMS_SYSINIT_ITEM( |
---|
| 1472 | _Console_simple_task_Initialize, |
---|
| 1473 | RTEMS_SYSINIT_DEVICE_DRIVERS, |
---|
[ac28f15] | 1474 | RTEMS_SYSINIT_ORDER_SECOND |
---|
| 1475 | ); |
---|
| 1476 | #endif |
---|
| 1477 | #endif |
---|
| 1478 | |
---|
[df49c60] | 1479 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[5877cc3a] | 1480 | #include <rtems/clockdrv.h> |
---|
[bb99cd0d] | 1481 | |
---|
| 1482 | #ifdef CONFIGURE_INIT |
---|
| 1483 | RTEMS_SYSINIT_ITEM( |
---|
| 1484 | _Clock_Initialize, |
---|
| 1485 | RTEMS_SYSINIT_DEVICE_DRIVERS, |
---|
| 1486 | RTEMS_SYSINIT_ORDER_THIRD |
---|
| 1487 | ); |
---|
| 1488 | #endif |
---|
[df49c60] | 1489 | #endif |
---|
| 1490 | |
---|
| 1491 | #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
[8fbe2e6] | 1492 | #include <rtems/btimer.h> |
---|
[08bae5e6] | 1493 | #endif |
---|
| 1494 | |
---|
[1d4bac9] | 1495 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
[5877cc3a] | 1496 | #include <rtems/rtc.h> |
---|
[1d4bac9] | 1497 | #endif |
---|
| 1498 | |
---|
[d2018f71] | 1499 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
[5877cc3a] | 1500 | #include <rtems/watchdogdrv.h> |
---|
[d2018f71] | 1501 | #endif |
---|
| 1502 | |
---|
[ad4759ab] | 1503 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 1504 | #include <rtems/framebuffer.h> |
---|
| 1505 | #endif |
---|
| 1506 | |
---|
[df49c60] | 1507 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
[5877cc3a] | 1508 | #include <rtems/devnull.h> |
---|
[08bae5e6] | 1509 | #endif |
---|
| 1510 | |
---|
[5af951f] | 1511 | #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER |
---|
| 1512 | #include <rtems/devzero.h> |
---|
| 1513 | #endif |
---|
| 1514 | |
---|
[c9b005a9] | 1515 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 1516 | /* the ide driver needs the ATA driver */ |
---|
[5877cc3a] | 1517 | #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1518 | #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1519 | #endif |
---|
| 1520 | #include <libchip/ide_ctrl.h> |
---|
[c9b005a9] | 1521 | #endif |
---|
| 1522 | |
---|
| 1523 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
[5877cc3a] | 1524 | #include <libchip/ata.h> |
---|
[c9b005a9] | 1525 | #endif |
---|
| 1526 | |
---|
[263f4bec] | 1527 | /** |
---|
| 1528 | * This specifies the maximum number of device drivers that |
---|
| 1529 | * can be installed in the system at one time. It must account |
---|
| 1530 | * for both the statically and dynamically installed drivers. |
---|
| 1531 | */ |
---|
| 1532 | #ifndef CONFIGURE_MAXIMUM_DRIVERS |
---|
| 1533 | #define CONFIGURE_MAXIMUM_DRIVERS |
---|
| 1534 | #endif |
---|
| 1535 | |
---|
[08bae5e6] | 1536 | #ifdef CONFIGURE_INIT |
---|
[263f4bec] | 1537 | rtems_driver_address_table |
---|
| 1538 | _IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = { |
---|
[09daf222] | 1539 | #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS |
---|
| 1540 | CONFIGURE_BSP_PREREQUISITE_DRIVERS, |
---|
| 1541 | #endif |
---|
| 1542 | #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS |
---|
| 1543 | CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS, |
---|
| 1544 | #endif |
---|
[5877cc3a] | 1545 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
| 1546 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 1547 | #endif |
---|
| 1548 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
| 1549 | RTC_DRIVER_TABLE_ENTRY, |
---|
| 1550 | #endif |
---|
| 1551 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
| 1552 | WATCHDOG_DRIVER_TABLE_ENTRY, |
---|
| 1553 | #endif |
---|
| 1554 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
| 1555 | DEVNULL_DRIVER_TABLE_ENTRY, |
---|
| 1556 | #endif |
---|
[5af951f] | 1557 | #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER |
---|
| 1558 | DEVZERO_DRIVER_TABLE_ENTRY, |
---|
| 1559 | #endif |
---|
[5877cc3a] | 1560 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 1561 | IDE_CONTROLLER_DRIVER_TABLE_ENTRY, |
---|
| 1562 | #endif |
---|
| 1563 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1564 | ATA_DRIVER_TABLE_ENTRY, |
---|
| 1565 | #endif |
---|
[ad4759ab] | 1566 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 1567 | FRAME_BUFFER_DRIVER_TABLE_ENTRY, |
---|
| 1568 | #endif |
---|
[5877cc3a] | 1569 | #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS |
---|
| 1570 | CONFIGURE_APPLICATION_EXTRA_DRIVERS, |
---|
| 1571 | #endif |
---|
| 1572 | #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER |
---|
| 1573 | NULL_DRIVER_TABLE_ENTRY |
---|
| 1574 | #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
[4175abd] | 1575 | !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ |
---|
| 1576 | !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \ |
---|
[5af951f] | 1577 | !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) && \ |
---|
[4175abd] | 1578 | !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \ |
---|
| 1579 | !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \ |
---|
[ad4759ab] | 1580 | !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \ |
---|
[4175abd] | 1581 | !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) |
---|
[5877cc3a] | 1582 | NULL_DRIVER_TABLE_ENTRY |
---|
| 1583 | #endif |
---|
| 1584 | }; |
---|
[08bae5e6] | 1585 | |
---|
[263f4bec] | 1586 | const size_t _IO_Number_of_drivers = |
---|
| 1587 | RTEMS_ARRAY_SIZE( _IO_Driver_address_table ); |
---|
[059a3714] | 1588 | #endif |
---|
| 1589 | |
---|
[c9b005a9] | 1590 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1591 | /* |
---|
| 1592 | * configure the priority of the ATA driver task |
---|
| 1593 | */ |
---|
[5877cc3a] | 1594 | #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY |
---|
| 1595 | #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY |
---|
| 1596 | #endif |
---|
| 1597 | #ifdef CONFIGURE_INIT |
---|
[3899a537] | 1598 | rtems_task_priority rtems_ata_driver_task_priority |
---|
[5877cc3a] | 1599 | = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; |
---|
| 1600 | #endif /* CONFIGURE_INIT */ |
---|
[c9b005a9] | 1601 | #endif |
---|
[bfe6391] | 1602 | /**@}*/ /* end of Device Driver Table Configuration */ |
---|
[c9b005a9] | 1603 | |
---|
[bfe6391] | 1604 | /** |
---|
| 1605 | * @defgroup ConfigurationLibBlock Configuration of LIBBLOCK |
---|
| 1606 | * |
---|
| 1607 | * @addtogroup Configuration |
---|
| 1608 | * |
---|
| 1609 | * This module contains parameters related to the LIBBLOCK buffering |
---|
| 1610 | * and caching subsystem. It requires tasks to swap out data to be |
---|
| 1611 | * written to non-volatile storage. |
---|
[c9b005a9] | 1612 | */ |
---|
[bfe6391] | 1613 | /**@{*/ |
---|
[c9b005a9] | 1614 | #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
[5877cc3a] | 1615 | #include <rtems/bdbuf.h> |
---|
| 1616 | /* |
---|
[3899a537] | 1617 | * configure the bdbuf cache parameters |
---|
[5877cc3a] | 1618 | */ |
---|
[3899a537] | 1619 | #ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS |
---|
| 1620 | #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \ |
---|
| 1621 | RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT |
---|
| 1622 | #endif |
---|
| 1623 | #ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS |
---|
| 1624 | #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \ |
---|
| 1625 | RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT |
---|
| 1626 | #endif |
---|
[5877cc3a] | 1627 | #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY |
---|
[3899a537] | 1628 | #define CONFIGURE_SWAPOUT_TASK_PRIORITY \ |
---|
| 1629 | RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT |
---|
| 1630 | #endif |
---|
| 1631 | #ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD |
---|
| 1632 | #define CONFIGURE_SWAPOUT_SWAP_PERIOD \ |
---|
| 1633 | RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT |
---|
| 1634 | #endif |
---|
| 1635 | #ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD |
---|
| 1636 | #define CONFIGURE_SWAPOUT_BLOCK_HOLD \ |
---|
| 1637 | RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT |
---|
[5877cc3a] | 1638 | #endif |
---|
[0d15414e] | 1639 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS |
---|
| 1640 | #define CONFIGURE_SWAPOUT_WORKER_TASKS \ |
---|
| 1641 | RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT |
---|
| 1642 | #endif |
---|
| 1643 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY |
---|
| 1644 | #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \ |
---|
| 1645 | RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT |
---|
| 1646 | #endif |
---|
[b6911069] | 1647 | #ifndef CONFIGURE_BDBUF_TASK_STACK_SIZE |
---|
| 1648 | #define CONFIGURE_BDBUF_TASK_STACK_SIZE \ |
---|
| 1649 | RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT |
---|
| 1650 | #endif |
---|
[0d15414e] | 1651 | #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE |
---|
| 1652 | #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \ |
---|
| 1653 | RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT |
---|
| 1654 | #endif |
---|
| 1655 | #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE |
---|
| 1656 | #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \ |
---|
| 1657 | RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT |
---|
| 1658 | #endif |
---|
| 1659 | #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE |
---|
| 1660 | #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \ |
---|
| 1661 | RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT |
---|
| 1662 | #endif |
---|
[39ee704e] | 1663 | #ifndef CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY |
---|
| 1664 | #define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY \ |
---|
| 1665 | RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT |
---|
| 1666 | #endif |
---|
[5877cc3a] | 1667 | #ifdef CONFIGURE_INIT |
---|
[28352fae] | 1668 | const rtems_bdbuf_config rtems_bdbuf_configuration = { |
---|
[3899a537] | 1669 | CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS, |
---|
| 1670 | CONFIGURE_BDBUF_MAX_WRITE_BLOCKS, |
---|
| 1671 | CONFIGURE_SWAPOUT_TASK_PRIORITY, |
---|
| 1672 | CONFIGURE_SWAPOUT_SWAP_PERIOD, |
---|
[0d15414e] | 1673 | CONFIGURE_SWAPOUT_BLOCK_HOLD, |
---|
| 1674 | CONFIGURE_SWAPOUT_WORKER_TASKS, |
---|
| 1675 | CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY, |
---|
[b6911069] | 1676 | CONFIGURE_BDBUF_TASK_STACK_SIZE, |
---|
[0d15414e] | 1677 | CONFIGURE_BDBUF_CACHE_MEMORY_SIZE, |
---|
| 1678 | CONFIGURE_BDBUF_BUFFER_MIN_SIZE, |
---|
[39ee704e] | 1679 | CONFIGURE_BDBUF_BUFFER_MAX_SIZE, |
---|
| 1680 | CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY |
---|
[3899a537] | 1681 | }; |
---|
[5877cc3a] | 1682 | #endif |
---|
[b2f216e1] | 1683 | |
---|
[07d71279] | 1684 | #define _CONFIGURE_LIBBLOCK_TASKS \ |
---|
[39ee704e] | 1685 | (1 + CONFIGURE_SWAPOUT_WORKER_TASKS + \ |
---|
| 1686 | (CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS != 0)) |
---|
[b6911069] | 1687 | |
---|
[07d71279] | 1688 | #define _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS \ |
---|
| 1689 | (_CONFIGURE_LIBBLOCK_TASKS * \ |
---|
[b6911069] | 1690 | (CONFIGURE_BDBUF_TASK_STACK_SIZE <= CONFIGURE_MINIMUM_TASK_STACK_SIZE ? \ |
---|
| 1691 | 0 : CONFIGURE_BDBUF_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)) |
---|
| 1692 | |
---|
[0d15414e] | 1693 | #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \ |
---|
| 1694 | defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \ |
---|
| 1695 | defined(CONFIGURE_BDBUF_BUFFER_COUNT) |
---|
| 1696 | #error BDBUF Cache does not use a buffer configuration table. Please remove. |
---|
| 1697 | #endif |
---|
[b2f216e1] | 1698 | #else |
---|
[bfe6391] | 1699 | /** This specifies the number of libblock tasks. */ |
---|
[07d71279] | 1700 | #define _CONFIGURE_LIBBLOCK_TASKS 0 |
---|
[bfe6391] | 1701 | /** This specifies the extra stack space configured for libblock tasks. */ |
---|
[07d71279] | 1702 | #define _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS 0 |
---|
[bfe6391] | 1703 | /** This specifies the number of Classic API semaphores needed by libblock. */ |
---|
[c9b005a9] | 1704 | #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */ |
---|
[bfe6391] | 1705 | /**@}*/ |
---|
[976162a6] | 1706 | |
---|
[bfe6391] | 1707 | /** |
---|
| 1708 | * @defgroup ConfigurationMultiprocessing Multiprocessing Configuration |
---|
| 1709 | * |
---|
| 1710 | * @addtogroup Configuration |
---|
| 1711 | * |
---|
| 1712 | * This module contains the parameters related to the Multiprocessing |
---|
| 1713 | * configuration of RTEMS. |
---|
| 1714 | * |
---|
| 1715 | * In a single processor or SMP configuration, only two parameters are |
---|
| 1716 | * needed and they are defaulted. The user should not have to specify |
---|
| 1717 | * any parameters. |
---|
| 1718 | */ |
---|
| 1719 | /**@{*/ |
---|
| 1720 | |
---|
| 1721 | /** |
---|
| 1722 | * This defines the extra stack space required for the MPCI server thread. |
---|
| 1723 | */ |
---|
[b4f635e] | 1724 | #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK |
---|
| 1725 | #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0 |
---|
| 1726 | #endif |
---|
| 1727 | |
---|
[976162a6] | 1728 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[5877cc3a] | 1729 | /* |
---|
| 1730 | * Default Multiprocessing Configuration Table. The defaults are |
---|
| 1731 | * appropriate for most of the RTEMS Multiprocessor Test Suite. Each |
---|
| 1732 | * value may be overridden within each test to customize the environment. |
---|
| 1733 | */ |
---|
[08bae5e6] | 1734 | |
---|
[5877cc3a] | 1735 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[d24b301] | 1736 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 1737 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 1738 | #endif |
---|
[08bae5e6] | 1739 | |
---|
[d24b301] | 1740 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
| 1741 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
| 1742 | #endif |
---|
[08bae5e6] | 1743 | |
---|
[d24b301] | 1744 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
| 1745 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
| 1746 | #endif |
---|
[08bae5e6] | 1747 | |
---|
[d24b301] | 1748 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
| 1749 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
| 1750 | #endif |
---|
| 1751 | |
---|
| 1752 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
| 1753 | #include <mpci.h> |
---|
| 1754 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
| 1755 | #endif |
---|
[08bae5e6] | 1756 | |
---|
[d24b301] | 1757 | #ifdef CONFIGURE_INIT |
---|
[24f8915] | 1758 | #if CONFIGURE_MP_NODE_NUMBER < 1 |
---|
| 1759 | #error "CONFIGURE_MP_NODE_NUMBER must be greater than or equal to one" |
---|
| 1760 | #endif |
---|
| 1761 | |
---|
| 1762 | #if CONFIGURE_MP_NODE_NUMBER > CONFIGURE_MP_MAXIMUM_NODES |
---|
| 1763 | #error "CONFIGURE_MP_NODE_NUMBER must be less than or equal to CONFIGURE_MP_MAXIMUM_NODES" |
---|
| 1764 | #endif |
---|
| 1765 | |
---|
[3fba9de2] | 1766 | Objects_MP_Control _Objects_MP_Controls[ |
---|
| 1767 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
| 1768 | ]; |
---|
| 1769 | |
---|
[1d9f509e] | 1770 | struct Thread_Configured_proxy_control { |
---|
| 1771 | Thread_Proxy_control Control; |
---|
| 1772 | Thread_queue_Configured_heads Heads; |
---|
| 1773 | }; |
---|
| 1774 | |
---|
| 1775 | static Thread_Configured_proxy_control _Thread_MP_Configured_proxies[ |
---|
| 1776 | CONFIGURE_MP_MAXIMUM_PROXIES |
---|
| 1777 | ]; |
---|
| 1778 | |
---|
| 1779 | Thread_Configured_proxy_control * const _Thread_MP_Proxies = |
---|
| 1780 | &_Thread_MP_Configured_proxies[ 0 ]; |
---|
| 1781 | |
---|
[24f8915] | 1782 | const MPCI_Configuration _MPCI_Configuration = { |
---|
[d24b301] | 1783 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 1784 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */ |
---|
| 1785 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 1786 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 1787 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */ |
---|
| 1788 | CONFIGURE_MP_MPCI_TABLE_POINTER /* ptr to MPCI config table */ |
---|
| 1789 | }; |
---|
[32991495] | 1790 | |
---|
| 1791 | char _MPCI_Receive_server_stack[ |
---|
| 1792 | CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 1793 | + CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK |
---|
| 1794 | + CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK |
---|
| 1795 | + CPU_ALL_TASKS_ARE_FP * CONTEXT_FP_SIZE |
---|
| 1796 | ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) |
---|
| 1797 | RTEMS_SECTION( ".rtemsstack.mpci" ); |
---|
[d24b301] | 1798 | #endif |
---|
[08bae5e6] | 1799 | |
---|
[d24b301] | 1800 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 1 |
---|
[5877cc3a] | 1801 | #else |
---|
[07d71279] | 1802 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0 |
---|
[5877cc3a] | 1803 | #endif /* CONFIGURE_MP_APPLICATION */ |
---|
[9a972889] | 1804 | #else |
---|
[07d71279] | 1805 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0 |
---|
[976162a6] | 1806 | #endif /* RTEMS_MULTIPROCESSING */ |
---|
[bfe6391] | 1807 | /**@}*/ /* end of Multiprocessing Configuration */ |
---|
[913ede4f] | 1808 | |
---|
[e53aae2] | 1809 | /** |
---|
| 1810 | * This macro specifies that the user wants to use unlimited objects for any |
---|
| 1811 | * classic or posix objects that have not already been given resource limits. |
---|
| 1812 | */ |
---|
| 1813 | #if defined(CONFIGURE_UNLIMITED_OBJECTS) |
---|
[2c1e7ff] | 1814 | #if !defined(CONFIGURE_UNIFIED_WORK_AREAS) && \ |
---|
| 1815 | !defined(CONFIGURE_EXECUTIVE_RAM_SIZE) && \ |
---|
| 1816 | !defined(CONFIGURE_MEMORY_OVERHEAD) |
---|
| 1817 | #error "CONFIGURE_UNLIMITED_OBJECTS requires a unified work area, an executive RAM size, or a defined workspace memory overhead" |
---|
| 1818 | #endif |
---|
| 1819 | |
---|
[e53aae2] | 1820 | #if !defined(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1821 | /** |
---|
| 1822 | * This macro specifies a default allocation size for when auto-extending |
---|
| 1823 | * unlimited objects if none was given by the user. |
---|
| 1824 | */ |
---|
| 1825 | #define CONFIGURE_UNLIMITED_ALLOCATION_SIZE 8 |
---|
| 1826 | #endif |
---|
| 1827 | #if !defined(CONFIGURE_MAXIMUM_TASKS) |
---|
| 1828 | #define CONFIGURE_MAXIMUM_TASKS \ |
---|
| 1829 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1830 | #endif |
---|
| 1831 | #if !defined(CONFIGURE_MAXIMUM_TIMERS) |
---|
| 1832 | #define CONFIGURE_MAXIMUM_TIMERS \ |
---|
| 1833 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1834 | #endif |
---|
| 1835 | #if !defined(CONFIGURE_MAXIMUM_SEMAPHORES) |
---|
| 1836 | #define CONFIGURE_MAXIMUM_SEMAPHORES \ |
---|
| 1837 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1838 | #endif |
---|
| 1839 | #if !defined(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) |
---|
| 1840 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES \ |
---|
| 1841 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1842 | #endif |
---|
| 1843 | #if !defined(CONFIGURE_MAXIMUM_PARTITIONS) |
---|
| 1844 | #define CONFIGURE_MAXIMUM_PARTITIONS \ |
---|
| 1845 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1846 | #endif |
---|
| 1847 | #if !defined(CONFIGURE_MAXIMUM_REGIONS) |
---|
| 1848 | #define CONFIGURE_MAXIMUM_REGIONS \ |
---|
| 1849 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1850 | #endif |
---|
| 1851 | #if !defined(CONFIGURE_MAXIMUM_PORTS) |
---|
| 1852 | #define CONFIGURE_MAXIMUM_PORTS \ |
---|
| 1853 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1854 | #endif |
---|
| 1855 | #if !defined(CONFIGURE_MAXIMUM_PERIODS) |
---|
| 1856 | #define CONFIGURE_MAXIMUM_PERIODS \ |
---|
| 1857 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1858 | #endif |
---|
| 1859 | #if !defined(CONFIGURE_MAXIMUM_BARRIERS) |
---|
| 1860 | #define CONFIGURE_MAXIMUM_BARRIERS \ |
---|
| 1861 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1862 | #endif |
---|
[0e98970] | 1863 | #if !defined(CONFIGURE_MAXIMUM_POSIX_KEYS) |
---|
| 1864 | #define CONFIGURE_MAXIMUM_POSIX_KEYS \ |
---|
| 1865 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1866 | #endif |
---|
| 1867 | #if !defined(CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS) |
---|
| 1868 | #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \ |
---|
| 1869 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1870 | #endif |
---|
[fe7aefd5] | 1871 | #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) |
---|
| 1872 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \ |
---|
| 1873 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1874 | #endif |
---|
[9318cfb0] | 1875 | #if !defined(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) |
---|
| 1876 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES \ |
---|
| 1877 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1878 | #endif |
---|
[701057e0] | 1879 | #if !defined(CONFIGURE_MAXIMUM_POSIX_SHMS) |
---|
| 1880 | #define CONFIGURE_MAXIMUM_POSIX_SHMS \ |
---|
| 1881 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1882 | #endif |
---|
[54f35888] | 1883 | #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS) |
---|
| 1884 | #define CONFIGURE_MAXIMUM_POSIX_THREADS \ |
---|
| 1885 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1886 | #endif |
---|
[e53aae2] | 1887 | |
---|
| 1888 | #ifdef RTEMS_POSIX_API |
---|
| 1889 | #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS) |
---|
| 1890 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS \ |
---|
| 1891 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1892 | #endif |
---|
| 1893 | #endif /* RTEMS_POSIX_API */ |
---|
| 1894 | #endif /* CONFIGURE_UNLIMITED_OBJECTS */ |
---|
| 1895 | |
---|
| 1896 | |
---|
[bfe6391] | 1897 | /** |
---|
| 1898 | * @defgroup ConfigurationClassicAPI Classic API Configuration |
---|
| 1899 | * |
---|
| 1900 | * @ingroup Configuration |
---|
| 1901 | * |
---|
| 1902 | * This module contains the parameters related to configuration |
---|
| 1903 | * of the Classic API services. |
---|
[08bae5e6] | 1904 | */ |
---|
[bfe6391] | 1905 | /**@{*/ |
---|
[8486081] | 1906 | |
---|
[68f339b6] | 1907 | /** This configures the maximum number of Classic API tasks. */ |
---|
| 1908 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 1909 | #define CONFIGURE_MAXIMUM_TASKS 0 |
---|
| 1910 | #endif |
---|
| 1911 | |
---|
| 1912 | /* |
---|
| 1913 | * This is calculated to account for the maximum number of Classic API |
---|
| 1914 | * tasks used by the application and configured RTEMS capabilities. |
---|
| 1915 | */ |
---|
| 1916 | #define _CONFIGURE_TASKS \ |
---|
| 1917 | (CONFIGURE_MAXIMUM_TASKS + _CONFIGURE_LIBBLOCK_TASKS) |
---|
[08bae5e6] | 1918 | |
---|
[68f339b6] | 1919 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
| 1920 | /** This specifies the maximum number of Classic API timers. */ |
---|
| 1921 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
| 1922 | #endif |
---|
[b6911069] | 1923 | |
---|
[68f339b6] | 1924 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
| 1925 | /** This specifies the maximum number of Classic API semaphores. */ |
---|
| 1926 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 1927 | #endif |
---|
[08bae5e6] | 1928 | |
---|
[68f339b6] | 1929 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
| 1930 | /** |
---|
| 1931 | * This configuration parameter specifies the maximum number of |
---|
| 1932 | * Classic API Message Queues. |
---|
| 1933 | */ |
---|
| 1934 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 1935 | #endif |
---|
| 1936 | |
---|
| 1937 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
| 1938 | /** |
---|
| 1939 | * This configuration parameter specifies the maximum number of |
---|
| 1940 | * Classic API Partitions. |
---|
| 1941 | */ |
---|
| 1942 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
| 1943 | #endif |
---|
[8fcafdd5] | 1944 | |
---|
[68f339b6] | 1945 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
| 1946 | /** |
---|
| 1947 | * This configuration parameter specifies the maximum number of |
---|
| 1948 | * Classic API Regions. |
---|
| 1949 | */ |
---|
| 1950 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
| 1951 | #endif |
---|
[08bae5e6] | 1952 | |
---|
[68f339b6] | 1953 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
| 1954 | /** |
---|
| 1955 | * This configuration parameter specifies the maximum number of |
---|
| 1956 | * Classic API Dual-Ported Memory Ports. |
---|
| 1957 | */ |
---|
| 1958 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 1959 | #endif |
---|
[08bae5e6] | 1960 | |
---|
[68f339b6] | 1961 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
| 1962 | /** |
---|
| 1963 | * This configuration parameter specifies the maximum number of |
---|
| 1964 | * Classic API Rate Monotonic Periods. |
---|
| 1965 | */ |
---|
| 1966 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 1967 | #endif |
---|
[08bae5e6] | 1968 | |
---|
[68f339b6] | 1969 | /** |
---|
| 1970 | * This configuration parameter specifies the maximum number of |
---|
| 1971 | * Classic API Barriers. |
---|
| 1972 | */ |
---|
| 1973 | #ifndef CONFIGURE_MAXIMUM_BARRIERS |
---|
| 1974 | #define CONFIGURE_MAXIMUM_BARRIERS 0 |
---|
| 1975 | #endif |
---|
[08bae5e6] | 1976 | |
---|
[68f339b6] | 1977 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
[bfe6391] | 1978 | /** |
---|
| 1979 | * This configuration parameter specifies the maximum number of |
---|
[68f339b6] | 1980 | * Classic API User Extensions. |
---|
[bfe6391] | 1981 | */ |
---|
[68f339b6] | 1982 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
| 1983 | #endif |
---|
[08bae5e6] | 1984 | |
---|
[68f339b6] | 1985 | /**@}*/ /* end of Classic API Configuration */ |
---|
[bfe6391] | 1986 | |
---|
[68f339b6] | 1987 | /** |
---|
| 1988 | * @defgroup ConfigurationGeneral General System Configuration |
---|
| 1989 | * |
---|
| 1990 | * @ingroup Configuration |
---|
| 1991 | * |
---|
| 1992 | * This module contains configuration parameters that are independent |
---|
| 1993 | * of any API but impact general system configuration. |
---|
| 1994 | */ |
---|
| 1995 | /**@{*/ |
---|
[08bae5e6] | 1996 | |
---|
[68f339b6] | 1997 | /** The configures the number of microseconds per clock tick. */ |
---|
| 1998 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 1999 | #define CONFIGURE_MICROSECONDS_PER_TICK \ |
---|
| 2000 | RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 2001 | #endif |
---|
[5877cc3a] | 2002 | |
---|
[68f339b6] | 2003 | #if 1000000 % CONFIGURE_MICROSECONDS_PER_TICK != 0 |
---|
| 2004 | #warning "The clock ticks per second is not an integer" |
---|
| 2005 | #endif |
---|
[381ef5c] | 2006 | |
---|
[68f339b6] | 2007 | #if CONFIGURE_MICROSECONDS_PER_TICK <= 0 |
---|
| 2008 | #error "The CONFIGURE_MICROSECONDS_PER_TICK must be positive" |
---|
| 2009 | #endif |
---|
[0ddffb76] | 2010 | |
---|
[68f339b6] | 2011 | #define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK) |
---|
[27cfe7c] | 2012 | |
---|
[68f339b6] | 2013 | /** The configures the number of clock ticks per timeslice. */ |
---|
| 2014 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 2015 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 2016 | #endif |
---|
[08bae5e6] | 2017 | |
---|
[bfe6391] | 2018 | /**@}*/ /* end of General Configuration */ |
---|
| 2019 | |
---|
[0451b44] | 2020 | /* |
---|
| 2021 | * Initial Extension Set |
---|
| 2022 | */ |
---|
| 2023 | |
---|
| 2024 | #ifdef CONFIGURE_INIT |
---|
[26443da] | 2025 | #if CONFIGURE_RECORD_PER_PROCESSOR_ITEMS > 0 |
---|
| 2026 | #include <rtems/record.h> |
---|
| 2027 | #endif |
---|
[4afd6f4] | 2028 | #ifdef CONFIGURE_STACK_CHECKER_ENABLED |
---|
[31bce9b] | 2029 | #include <rtems/stackchk.h> |
---|
[0451b44] | 2030 | #endif |
---|
[26443da] | 2031 | |
---|
[c3db01d0] | 2032 | #include <rtems/libcsupport.h> |
---|
[0451b44] | 2033 | |
---|
[228df42] | 2034 | #if defined(BSP_INITIAL_EXTENSION) || \ |
---|
| 2035 | defined(CONFIGURE_INITIAL_EXTENSIONS) || \ |
---|
[4afd6f4] | 2036 | defined(CONFIGURE_STACK_CHECKER_ENABLED) || \ |
---|
[c3db01d0] | 2037 | (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
[5ae6112] | 2038 | const User_extensions_Table _User_extensions_Initial_extensions[] = { |
---|
[dca6184] | 2039 | #if CONFIGURE_RECORD_PER_PROCESSOR_ITEMS > 0 && \ |
---|
| 2040 | defined(CONFIGURE_RECORD_EXTENSIONS_ENABLED) |
---|
| 2041 | RECORD_EXTENSION, |
---|
| 2042 | #endif |
---|
[c3db01d0] | 2043 | #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2044 | RTEMS_NEWLIB_EXTENSION, |
---|
| 2045 | #endif |
---|
[4afd6f4] | 2046 | #if defined(CONFIGURE_STACK_CHECKER_ENABLED) |
---|
[c3db01d0] | 2047 | RTEMS_STACK_CHECKER_EXTENSION, |
---|
| 2048 | #endif |
---|
| 2049 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) |
---|
| 2050 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
| 2051 | #endif |
---|
[228df42] | 2052 | #if defined(BSP_INITIAL_EXTENSION) |
---|
| 2053 | BSP_INITIAL_EXTENSION |
---|
| 2054 | #endif |
---|
[c3db01d0] | 2055 | }; |
---|
| 2056 | |
---|
[5ae6112] | 2057 | const size_t _User_extensions_Initial_count = |
---|
| 2058 | RTEMS_ARRAY_SIZE( _User_extensions_Initial_extensions ); |
---|
| 2059 | |
---|
| 2060 | User_extensions_Switch_control _User_extensions_Initial_switch_controls[ |
---|
| 2061 | RTEMS_ARRAY_SIZE( _User_extensions_Initial_extensions ) |
---|
| 2062 | ]; |
---|
[a853c851] | 2063 | |
---|
| 2064 | RTEMS_SYSINIT_ITEM( |
---|
| 2065 | _User_extensions_Handler_initialization, |
---|
| 2066 | RTEMS_SYSINIT_INITIAL_EXTENSIONS, |
---|
| 2067 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2068 | ); |
---|
[96e6a86c] | 2069 | #endif |
---|
| 2070 | |
---|
[d1f7204] | 2071 | #if defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2072 | struct _reent *__getreent(void) |
---|
| 2073 | { |
---|
| 2074 | return _Thread_Get_executing()->libc_reent; |
---|
| 2075 | } |
---|
[9c9b62d8] | 2076 | #endif |
---|
[0451b44] | 2077 | |
---|
[08bae5e6] | 2078 | #endif |
---|
| 2079 | |
---|
[bfe6391] | 2080 | /** |
---|
| 2081 | * @defgroup ConfigurationPOSIXAPI POSIX API Configuration Parameters |
---|
| 2082 | * |
---|
| 2083 | * This module contains the parameters related to configuration |
---|
| 2084 | * of the POSIX API services. |
---|
[2eba45d] | 2085 | */ |
---|
[bfe6391] | 2086 | /**@{*/ |
---|
[2eba45d] | 2087 | |
---|
[bfe6391] | 2088 | /** |
---|
| 2089 | * This configuration parameter specifies the maximum number of |
---|
| 2090 | * POSIX API keys. |
---|
| 2091 | * |
---|
| 2092 | * POSIX Keys are available whether or not the POSIX API is enabled. |
---|
| 2093 | */ |
---|
[e6c87f7] | 2094 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
[5c0c0cf] | 2095 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
| 2096 | #endif |
---|
| 2097 | |
---|
[07d71279] | 2098 | /* |
---|
[bfe6391] | 2099 | * This macro is calculated to specify the memory required for |
---|
| 2100 | * POSIX API key/value pairs. |
---|
| 2101 | */ |
---|
[5c0c0cf] | 2102 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS |
---|
| 2103 | #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \ |
---|
| 2104 | (CONFIGURE_MAXIMUM_POSIX_KEYS * \ |
---|
| 2105 | (CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_TASKS)) |
---|
[e6c87f7] | 2106 | #endif |
---|
[2eba45d] | 2107 | |
---|
[07d71279] | 2108 | /* |
---|
[bfe6391] | 2109 | * This macro is calculated to specify the total number of |
---|
| 2110 | * POSIX API keys required by the application and configured |
---|
| 2111 | * system capabilities. |
---|
| 2112 | */ |
---|
[07d71279] | 2113 | #define _CONFIGURE_POSIX_KEYS \ |
---|
| 2114 | (CONFIGURE_MAXIMUM_POSIX_KEYS + _CONFIGURE_LIBIO_POSIX_KEYS) |
---|
[5c0c0cf] | 2115 | |
---|
[54f35888] | 2116 | /** |
---|
| 2117 | * This configuration parameter specifies the maximum number of |
---|
| 2118 | * POSIX API threads. |
---|
| 2119 | */ |
---|
| 2120 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 2121 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 2122 | #endif |
---|
| 2123 | |
---|
[9318cfb0] | 2124 | /* |
---|
| 2125 | * Account for the object control structures plus the name |
---|
| 2126 | * of the object to be duplicated. |
---|
| 2127 | */ |
---|
| 2128 | #define _Configure_POSIX_Named_Object_RAM(_number, _size) \ |
---|
[21275b58] | 2129 | (_Configure_Max_Objects(_number) \ |
---|
| 2130 | * _Configure_From_workspace(_POSIX_PATH_MAX + 1)) |
---|
[9318cfb0] | 2131 | |
---|
[fe7aefd5] | 2132 | /** |
---|
| 2133 | * This configuration parameter specifies the maximum number of |
---|
| 2134 | * POSIX API message queues. |
---|
| 2135 | */ |
---|
| 2136 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
| 2137 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
| 2138 | #endif |
---|
| 2139 | |
---|
| 2140 | /* |
---|
| 2141 | * This macro is calculated to specify the memory required for |
---|
| 2142 | * POSIX API message queues. |
---|
| 2143 | */ |
---|
| 2144 | #define _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
| 2145 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 2146 | _message_queues, sizeof(POSIX_Message_queue_Control) ) |
---|
| 2147 | |
---|
[9318cfb0] | 2148 | /** |
---|
| 2149 | * This configuration parameter specifies the maximum number of |
---|
| 2150 | * POSIX API semaphores. |
---|
| 2151 | */ |
---|
| 2152 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
| 2153 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
| 2154 | #endif |
---|
| 2155 | |
---|
| 2156 | /* |
---|
| 2157 | * This macro is calculated to specify the memory required for |
---|
| 2158 | * POSIX API semaphores. |
---|
| 2159 | */ |
---|
| 2160 | #define _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
| 2161 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 2162 | _semaphores, sizeof(POSIX_Semaphore_Control) ) |
---|
| 2163 | |
---|
[701057e0] | 2164 | /** |
---|
| 2165 | * Configure the maximum number of POSIX shared memory objects. |
---|
| 2166 | */ |
---|
| 2167 | #ifndef CONFIGURE_MAXIMUM_POSIX_SHMS |
---|
| 2168 | #define CONFIGURE_MAXIMUM_POSIX_SHMS 0 |
---|
| 2169 | #endif |
---|
| 2170 | |
---|
| 2171 | /* |
---|
| 2172 | * This macro is calculated to specify the memory required for |
---|
| 2173 | * POSIX API shared memory. |
---|
| 2174 | */ |
---|
| 2175 | #define _CONFIGURE_MEMORY_FOR_POSIX_SHMS(_shms) \ |
---|
| 2176 | _Configure_POSIX_Named_Object_RAM(_shms, sizeof(POSIX_Shm_Control) ) |
---|
| 2177 | |
---|
[21275b58] | 2178 | /** |
---|
| 2179 | * This configuration parameter specifies the maximum number of |
---|
| 2180 | * POSIX API timers. |
---|
[e6c87f7] | 2181 | */ |
---|
[21275b58] | 2182 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
| 2183 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
| 2184 | #endif |
---|
[5877cc3a] | 2185 | |
---|
[21275b58] | 2186 | #if !defined(RTEMS_POSIX_API) && CONFIGURE_MAXIMUM_POSIX_TIMERS != 0 |
---|
| 2187 | #error "CONFIGURE_MAXIMUM_POSIX_TIMERS must be zero if POSIX API is disabled" |
---|
| 2188 | #endif |
---|
[bfe6391] | 2189 | |
---|
[21275b58] | 2190 | /** |
---|
| 2191 | * This configuration parameter specifies the maximum number of |
---|
| 2192 | * POSIX API queued signals. |
---|
| 2193 | */ |
---|
| 2194 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
| 2195 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
| 2196 | #endif |
---|
[0747e2d] | 2197 | |
---|
[21275b58] | 2198 | #if !defined(RTEMS_POSIX_API) && CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0 |
---|
| 2199 | #error "CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS must be zero if POSIX API is disabled" |
---|
| 2200 | #endif |
---|
[bfe6391] | 2201 | |
---|
[21275b58] | 2202 | #if CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS > 0 |
---|
| 2203 | #define _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS \ |
---|
| 2204 | _Configure_From_workspace( (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) * \ |
---|
| 2205 | sizeof( POSIX_signals_Siginfo_node ) ) |
---|
| 2206 | #else |
---|
| 2207 | #define _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS 0 |
---|
| 2208 | #endif |
---|
[eb0551f] | 2209 | |
---|
[54f35888] | 2210 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
| 2211 | #ifndef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
| 2212 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
| 2213 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
| 2214 | #endif |
---|
[5240c71c] | 2215 | |
---|
[54f35888] | 2216 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 2217 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ |
---|
| 2218 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE |
---|
| 2219 | #endif |
---|
[adbb578] | 2220 | |
---|
[54f35888] | 2221 | #ifdef CONFIGURE_INIT |
---|
| 2222 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
| 2223 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, |
---|
| 2224 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
| 2225 | }; |
---|
| 2226 | #endif |
---|
[2eba45d] | 2227 | |
---|
[54f35888] | 2228 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \ |
---|
| 2229 | POSIX_Initialization_threads |
---|
[8486081] | 2230 | |
---|
[54f35888] | 2231 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
| 2232 | RTEMS_ARRAY_SIZE(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) |
---|
| 2233 | #endif /* !CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 2234 | #else /* !CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
| 2235 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
| 2236 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
| 2237 | #endif /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
[352c9b2] | 2238 | |
---|
[bfe6391] | 2239 | /** |
---|
| 2240 | * This configuration parameter specifies the stack size of the |
---|
| 2241 | * POSIX API Initialization thread (if used). |
---|
| 2242 | */ |
---|
[5877cc3a] | 2243 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 2244 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
[352c9b2] | 2245 | #endif |
---|
[bfe6391] | 2246 | /**@}*/ /* end of POSIX API Configuration */ |
---|
[352c9b2] | 2247 | |
---|
[b4f635e] | 2248 | /** |
---|
[27f071cd] | 2249 | * This is so we can account for tasks with stacks greater than minimum |
---|
| 2250 | * size. This is in bytes. |
---|
[b4f635e] | 2251 | */ |
---|
| 2252 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
| 2253 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
| 2254 | #endif |
---|
[5aecf664] | 2255 | |
---|
[3f1bf0c] | 2256 | /* |
---|
| 2257 | * We must be able to split the free block used for the second last allocation |
---|
| 2258 | * into two parts so that we have a free block for the last allocation. See |
---|
| 2259 | * _Heap_Block_split(). |
---|
| 2260 | */ |
---|
[07d71279] | 2261 | #define _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[ffe14b26] | 2262 | _Configure_Align_up( HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT ) |
---|
[3f1bf0c] | 2263 | |
---|
[21275b58] | 2264 | /** |
---|
| 2265 | * This calculates the amount of memory reserved for the IDLE tasks. |
---|
| 2266 | * In an SMP system, each CPU core has its own idle task. |
---|
| 2267 | */ |
---|
| 2268 | #define _CONFIGURE_IDLE_TASKS_COUNT _CONFIGURE_MAXIMUM_PROCESSORS |
---|
| 2269 | |
---|
[8486081] | 2270 | /* |
---|
[3652ad35] | 2271 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
| 2272 | */ |
---|
[08bae5e6] | 2273 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
[3652ad35] | 2274 | |
---|
[5877cc3a] | 2275 | /** |
---|
[27f071cd] | 2276 | * The following macro is used to calculate the memory allocated by RTEMS |
---|
| 2277 | * for the message buffers associated with a particular message queue. |
---|
| 2278 | * There is a fixed amount of overhead per message. |
---|
[5877cc3a] | 2279 | */ |
---|
| 2280 | #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \ |
---|
| 2281 | _Configure_From_workspace( \ |
---|
[b1b6f3b0] | 2282 | (_messages) * (_Configure_Align_up(_size, sizeof(uintptr_t)) \ |
---|
| 2283 | + sizeof(CORE_message_queue_Buffer_control))) |
---|
[5877cc3a] | 2284 | |
---|
[07d71279] | 2285 | /* |
---|
[bfe6391] | 2286 | * This macro is set to the amount of memory required for pending message |
---|
[27f071cd] | 2287 | * buffers in bytes. It should be constructed by adding together a |
---|
| 2288 | * set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE. |
---|
[7042065] | 2289 | */ |
---|
| 2290 | #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
[5877cc3a] | 2291 | #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 |
---|
[7042065] | 2292 | #endif |
---|
| 2293 | |
---|
[5877cc3a] | 2294 | /** |
---|
[27f071cd] | 2295 | * This macro is available just in case the confdefs.h file underallocates |
---|
| 2296 | * memory for a particular application. This lets the user add some extra |
---|
| 2297 | * memory in case something broken and underestimates. |
---|
[5877cc3a] | 2298 | * |
---|
[27f071cd] | 2299 | * It is also possible for cases where confdefs.h overallocates memory, |
---|
| 2300 | * you could substract memory from the allocated. The estimate is just |
---|
| 2301 | * that, an estimate, and assumes worst case alignment and padding on |
---|
| 2302 | * each allocated element. So in some cases it could be too conservative. |
---|
[5877cc3a] | 2303 | * |
---|
[27f071cd] | 2304 | * NOTE: Historically this was used for message buffers. |
---|
[7042065] | 2305 | */ |
---|
| 2306 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
[5877cc3a] | 2307 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
| 2308 | #endif |
---|
| 2309 | |
---|
| 2310 | /** |
---|
[27f071cd] | 2311 | * This calculates the memory required for the executive workspace. |
---|
[bfe6391] | 2312 | * |
---|
| 2313 | * This is an internal parameter. |
---|
[5877cc3a] | 2314 | */ |
---|
| 2315 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
[3f1bf0c] | 2316 | ( \ |
---|
[fe7aefd5] | 2317 | _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
| 2318 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \ |
---|
[9318cfb0] | 2319 | _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
| 2320 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) + \ |
---|
[701057e0] | 2321 | _CONFIGURE_MEMORY_FOR_POSIX_SHMS( \ |
---|
| 2322 | CONFIGURE_MAXIMUM_POSIX_SHMS) + \ |
---|
[21275b58] | 2323 | _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS + \ |
---|
[7042065] | 2324 | CONFIGURE_MESSAGE_BUFFER_MEMORY + \ |
---|
[3f1bf0c] | 2325 | (CONFIGURE_MEMORY_OVERHEAD * 1024) + \ |
---|
[07d71279] | 2326 | _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[3f1bf0c] | 2327 | ) |
---|
[b4f635e] | 2328 | |
---|
| 2329 | /* |
---|
| 2330 | * Now account for any extra memory that initialization tasks or threads |
---|
| 2331 | * may have requested. |
---|
| 2332 | */ |
---|
| 2333 | |
---|
[07d71279] | 2334 | /* |
---|
[27f071cd] | 2335 | * This accounts for any extra memory required by the Classic API |
---|
| 2336 | * Initialization Task. |
---|
[b4f635e] | 2337 | */ |
---|
| 2338 | #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[07d71279] | 2339 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \ |
---|
[b4f635e] | 2340 | (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
| 2341 | #else |
---|
[07d71279] | 2342 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0 |
---|
[08bae5e6] | 2343 | #endif |
---|
| 2344 | |
---|
[07d71279] | 2345 | /* |
---|
[27f071cd] | 2346 | * This accounts for any extra memory required by the POSIX API |
---|
| 2347 | * Initialization Thread. |
---|
[b4f635e] | 2348 | */ |
---|
[54f35888] | 2349 | #if (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \ |
---|
[b4f635e] | 2350 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE) |
---|
[07d71279] | 2351 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \ |
---|
[b4f635e] | 2352 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - \ |
---|
| 2353 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE) |
---|
| 2354 | #else |
---|
[07d71279] | 2355 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0 |
---|
[b4f635e] | 2356 | #endif |
---|
| 2357 | |
---|
[07d71279] | 2358 | /* |
---|
[27f071cd] | 2359 | * This macro provides a summation of the various initialization task |
---|
| 2360 | * and thread stack requirements. |
---|
[b4f635e] | 2361 | */ |
---|
[07d71279] | 2362 | #define _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS \ |
---|
| 2363 | (_CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \ |
---|
| 2364 | _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART) |
---|
[b4f635e] | 2365 | |
---|
[07d71279] | 2366 | /* |
---|
[bfe6391] | 2367 | * This macro is calculated to specify the memory required for |
---|
| 2368 | * the stacks of all tasks. |
---|
| 2369 | */ |
---|
[07d71279] | 2370 | #define _CONFIGURE_TASKS_STACK \ |
---|
| 2371 | (_Configure_Max_Objects( _CONFIGURE_TASKS ) * \ |
---|
[9fa3cf0d] | 2372 | _Configure_From_stackspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) ) |
---|
[b4f635e] | 2373 | |
---|
[07d71279] | 2374 | /* |
---|
[bfe6391] | 2375 | * This macro is calculated to specify the memory required for |
---|
| 2376 | * the stacks of all POSIX threads. |
---|
| 2377 | */ |
---|
[07d71279] | 2378 | #define _CONFIGURE_POSIX_THREADS_STACK \ |
---|
[b4f635e] | 2379 | (_Configure_Max_Objects( CONFIGURE_MAXIMUM_POSIX_THREADS ) * \ |
---|
[9fa3cf0d] | 2380 | _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) ) |
---|
[b4f635e] | 2381 | |
---|
| 2382 | #else /* CONFIGURE_EXECUTIVE_RAM_SIZE */ |
---|
| 2383 | |
---|
[07d71279] | 2384 | #define _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS 0 |
---|
| 2385 | #define _CONFIGURE_TASKS_STACK 0 |
---|
| 2386 | #define _CONFIGURE_POSIX_THREADS_STACK 0 |
---|
[b4f635e] | 2387 | |
---|
| 2388 | #if CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK != 0 |
---|
| 2389 | #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK" |
---|
| 2390 | #endif |
---|
| 2391 | |
---|
| 2392 | #if CONFIGURE_EXTRA_TASK_STACKS != 0 |
---|
| 2393 | #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_TASK_STACKS" |
---|
| 2394 | #endif |
---|
| 2395 | |
---|
| 2396 | #endif /* CONFIGURE_EXECUTIVE_RAM_SIZE */ |
---|
| 2397 | |
---|
[07d71279] | 2398 | /* |
---|
[bfe6391] | 2399 | * This macro is calculated to specify the memory required for |
---|
| 2400 | * all tasks and threads of all varieties. |
---|
| 2401 | */ |
---|
[07d71279] | 2402 | #define _CONFIGURE_STACK_SPACE_SIZE \ |
---|
[b4f635e] | 2403 | ( \ |
---|
[07d71279] | 2404 | _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \ |
---|
| 2405 | _CONFIGURE_TASKS_STACK + \ |
---|
| 2406 | _CONFIGURE_POSIX_THREADS_STACK + \ |
---|
| 2407 | _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS + \ |
---|
[3f1bf0c] | 2408 | CONFIGURE_EXTRA_TASK_STACKS + \ |
---|
[07d71279] | 2409 | _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[b4f635e] | 2410 | ) |
---|
| 2411 | |
---|
[da6ad56] | 2412 | #ifndef CONFIGURE_MAXIMUM_THREAD_NAME_SIZE |
---|
[5ee70c5] | 2413 | #define CONFIGURE_MAXIMUM_THREAD_NAME_SIZE THREAD_DEFAULT_MAXIMUM_NAME_SIZE |
---|
[da6ad56] | 2414 | #endif |
---|
| 2415 | |
---|
[08bae5e6] | 2416 | #ifdef CONFIGURE_INIT |
---|
[5d6b211] | 2417 | typedef union { |
---|
| 2418 | Scheduler_Node Base; |
---|
| 2419 | #ifdef CONFIGURE_SCHEDULER_CBS |
---|
| 2420 | Scheduler_CBS_Node CBS; |
---|
| 2421 | #endif |
---|
| 2422 | #ifdef CONFIGURE_SCHEDULER_EDF |
---|
| 2423 | Scheduler_EDF_Node EDF; |
---|
| 2424 | #endif |
---|
[f3d9f228] | 2425 | #ifdef CONFIGURE_SCHEDULER_EDF_SMP |
---|
| 2426 | Scheduler_EDF_SMP_Node EDF_SMP; |
---|
| 2427 | #endif |
---|
[5d6b211] | 2428 | #ifdef CONFIGURE_SCHEDULER_PRIORITY |
---|
| 2429 | Scheduler_priority_Node Priority; |
---|
| 2430 | #endif |
---|
| 2431 | #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP |
---|
| 2432 | Scheduler_SMP_Node Simple_SMP; |
---|
| 2433 | #endif |
---|
| 2434 | #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP |
---|
| 2435 | Scheduler_priority_SMP_Node Priority_SMP; |
---|
| 2436 | #endif |
---|
| 2437 | #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP |
---|
| 2438 | Scheduler_priority_affinity_SMP_Node Priority_affinity_SMP; |
---|
| 2439 | #endif |
---|
| 2440 | #ifdef CONFIGURE_SCHEDULER_STRONG_APA |
---|
| 2441 | Scheduler_strong_APA_Node Strong_APA; |
---|
| 2442 | #endif |
---|
| 2443 | #ifdef CONFIGURE_SCHEDULER_USER_PER_THREAD |
---|
| 2444 | CONFIGURE_SCHEDULER_USER_PER_THREAD User; |
---|
| 2445 | #endif |
---|
| 2446 | } Configuration_Scheduler_node; |
---|
| 2447 | |
---|
| 2448 | #ifdef RTEMS_SMP |
---|
| 2449 | const size_t _Scheduler_Node_size = sizeof( Configuration_Scheduler_node ); |
---|
| 2450 | #endif |
---|
| 2451 | |
---|
[da6ad56] | 2452 | const size_t _Thread_Maximum_name_size = CONFIGURE_MAXIMUM_THREAD_NAME_SIZE; |
---|
| 2453 | |
---|
[21275b58] | 2454 | struct Thread_Configured_control { |
---|
[69aa3349] | 2455 | Thread_Control Control; |
---|
| 2456 | #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0 |
---|
| 2457 | void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ]; |
---|
| 2458 | #endif |
---|
[61d5c886] | 2459 | Configuration_Scheduler_node Scheduler_nodes[ _CONFIGURE_SCHEDULER_COUNT ]; |
---|
[69aa3349] | 2460 | RTEMS_API_Control API_RTEMS; |
---|
| 2461 | #ifdef RTEMS_POSIX_API |
---|
| 2462 | POSIX_API_Control API_POSIX; |
---|
| 2463 | #endif |
---|
[da6ad56] | 2464 | #if CONFIGURE_MAXIMUM_THREAD_NAME_SIZE > 1 |
---|
| 2465 | char name[ CONFIGURE_MAXIMUM_THREAD_NAME_SIZE ]; |
---|
| 2466 | #endif |
---|
[69aa3349] | 2467 | #if !defined(RTEMS_SCHEDSIM) \ |
---|
| 2468 | && defined(RTEMS_NEWLIB) \ |
---|
| 2469 | && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2470 | struct _reent Newlib; |
---|
| 2471 | #else |
---|
| 2472 | struct { /* Empty */ } Newlib; |
---|
| 2473 | #endif |
---|
[21275b58] | 2474 | }; |
---|
[69aa3349] | 2475 | |
---|
| 2476 | const Thread_Control_add_on _Thread_Control_add_ons[] = { |
---|
| 2477 | { |
---|
[21275b58] | 2478 | offsetof( Thread_Configured_control, Control.Scheduler.nodes ), |
---|
| 2479 | offsetof( Thread_Configured_control, Scheduler_nodes ) |
---|
[69aa3349] | 2480 | }, { |
---|
| 2481 | offsetof( |
---|
[21275b58] | 2482 | Thread_Configured_control, |
---|
[69aa3349] | 2483 | Control.API_Extensions[ THREAD_API_RTEMS ] |
---|
| 2484 | ), |
---|
[21275b58] | 2485 | offsetof( Thread_Configured_control, API_RTEMS ) |
---|
[69aa3349] | 2486 | }, { |
---|
| 2487 | offsetof( |
---|
[21275b58] | 2488 | Thread_Configured_control, |
---|
[69aa3349] | 2489 | Control.libc_reent |
---|
| 2490 | ), |
---|
[21275b58] | 2491 | offsetof( Thread_Configured_control, Newlib ) |
---|
[69aa3349] | 2492 | } |
---|
[da6ad56] | 2493 | #if CONFIGURE_MAXIMUM_THREAD_NAME_SIZE > 1 |
---|
| 2494 | , { |
---|
| 2495 | offsetof( |
---|
[21275b58] | 2496 | Thread_Configured_control, |
---|
[da6ad56] | 2497 | Control.Join_queue.Queue.name |
---|
| 2498 | ), |
---|
[21275b58] | 2499 | offsetof( Thread_Configured_control, name ) |
---|
[da6ad56] | 2500 | } |
---|
| 2501 | #endif |
---|
[69aa3349] | 2502 | #ifdef RTEMS_POSIX_API |
---|
| 2503 | , { |
---|
| 2504 | offsetof( |
---|
[21275b58] | 2505 | Thread_Configured_control, |
---|
[69aa3349] | 2506 | Control.API_Extensions[ THREAD_API_POSIX ] |
---|
| 2507 | ), |
---|
[21275b58] | 2508 | offsetof( Thread_Configured_control, API_POSIX ) |
---|
[69aa3349] | 2509 | } |
---|
| 2510 | #endif |
---|
| 2511 | }; |
---|
| 2512 | |
---|
| 2513 | const size_t _Thread_Control_add_on_count = |
---|
| 2514 | RTEMS_ARRAY_SIZE( _Thread_Control_add_ons ); |
---|
| 2515 | |
---|
[21275b58] | 2516 | #if defined(RTEMS_SMP) |
---|
| 2517 | struct Thread_queue_Configured_heads { |
---|
| 2518 | Thread_queue_Heads Heads; |
---|
| 2519 | Thread_queue_Priority_queue Priority[ _CONFIGURE_SCHEDULER_COUNT ]; |
---|
| 2520 | }; |
---|
| 2521 | |
---|
| 2522 | const size_t _Thread_queue_Heads_size = |
---|
| 2523 | sizeof( Thread_queue_Configured_heads ); |
---|
| 2524 | #endif |
---|
| 2525 | |
---|
[cea5ff7] | 2526 | const uint32_t _Watchdog_Nanoseconds_per_tick = |
---|
[21275b58] | 2527 | (uint32_t) 1000 * CONFIGURE_MICROSECONDS_PER_TICK; |
---|
[cea5ff7] | 2528 | |
---|
[27cfe7c] | 2529 | const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND; |
---|
| 2530 | |
---|
[32991495] | 2531 | const size_t _Thread_Initial_thread_count = |
---|
[21275b58] | 2532 | rtems_resource_maximum_per_allocation( _CONFIGURE_TASKS ) + |
---|
[88c198b] | 2533 | rtems_resource_maximum_per_allocation( CONFIGURE_MAXIMUM_POSIX_THREADS ); |
---|
[21275b58] | 2534 | |
---|
| 2535 | THREAD_INFORMATION_DEFINE( |
---|
| 2536 | _Thread, |
---|
| 2537 | OBJECTS_INTERNAL_API, |
---|
| 2538 | OBJECTS_INTERNAL_THREADS, |
---|
| 2539 | _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT |
---|
| 2540 | ); |
---|
| 2541 | |
---|
[32991495] | 2542 | char _Thread_Idle_stacks[ |
---|
| 2543 | _CONFIGURE_IDLE_TASKS_COUNT |
---|
| 2544 | * ( CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 2545 | + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE ) |
---|
| 2546 | ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) |
---|
| 2547 | RTEMS_SECTION( ".rtemsstack.idle" ); |
---|
| 2548 | |
---|
[b1b6dd71] | 2549 | #if CONFIGURE_MAXIMUM_BARRIERS > 0 |
---|
| 2550 | BARRIER_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_BARRIERS ); |
---|
[21275b58] | 2551 | #endif |
---|
| 2552 | |
---|
| 2553 | #if CONFIGURE_MAXIMUM_MESSAGE_QUEUES > 0 |
---|
| 2554 | MESSAGE_QUEUE_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_MESSAGE_QUEUES ); |
---|
| 2555 | #endif |
---|
| 2556 | |
---|
| 2557 | #if CONFIGURE_MAXIMUM_PARTITIONS > 0 |
---|
| 2558 | PARTITION_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_PARTITIONS ); |
---|
| 2559 | #endif |
---|
| 2560 | |
---|
| 2561 | #if CONFIGURE_MAXIMUM_PERIODS > 0 |
---|
| 2562 | RATE_MONOTONIC_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_PERIODS ); |
---|
| 2563 | #endif |
---|
| 2564 | |
---|
| 2565 | #if CONFIGURE_MAXIMUM_PORTS > 0 |
---|
| 2566 | DUAL_PORTED_MEMORY_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_PORTS ); |
---|
| 2567 | #endif |
---|
| 2568 | |
---|
| 2569 | #if CONFIGURE_MAXIMUM_REGIONS > 0 |
---|
| 2570 | REGION_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_REGIONS ); |
---|
| 2571 | #endif |
---|
| 2572 | |
---|
| 2573 | #if CONFIGURE_MAXIMUM_SEMAPHORES > 0 |
---|
[46865542] | 2574 | SEMAPHORE_INFORMATION_DEFINE( |
---|
| 2575 | CONFIGURE_MAXIMUM_SEMAPHORES, |
---|
| 2576 | _CONFIGURE_SCHEDULER_COUNT |
---|
| 2577 | ); |
---|
[21275b58] | 2578 | #endif |
---|
| 2579 | |
---|
[84aee2e9] | 2580 | #if CONFIGURE_MAXIMUM_TIMERS > 0 |
---|
| 2581 | TIMER_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_TIMERS ); |
---|
[21275b58] | 2582 | #endif |
---|
| 2583 | |
---|
| 2584 | #if _CONFIGURE_TASKS > 0 |
---|
| 2585 | THREAD_INFORMATION_DEFINE( |
---|
| 2586 | _RTEMS_tasks, |
---|
| 2587 | OBJECTS_CLASSIC_API, |
---|
| 2588 | OBJECTS_RTEMS_TASKS, |
---|
| 2589 | _CONFIGURE_TASKS |
---|
| 2590 | ); |
---|
| 2591 | #endif |
---|
| 2592 | |
---|
| 2593 | #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0 |
---|
| 2594 | EXTENSION_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_USER_EXTENSIONS ); |
---|
| 2595 | #endif |
---|
| 2596 | |
---|
[5877cc3a] | 2597 | /** |
---|
[27f071cd] | 2598 | * This is the Classic API Configuration Table. |
---|
[5877cc3a] | 2599 | */ |
---|
| 2600 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
| 2601 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
| 2602 | CONFIGURE_INIT_TASK_TABLE |
---|
| 2603 | }; |
---|
[e6d4b1d] | 2604 | |
---|
[21275b58] | 2605 | #if CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS > 0 |
---|
| 2606 | POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[ |
---|
| 2607 | rtems_resource_maximum_per_allocation( |
---|
| 2608 | CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS |
---|
| 2609 | ) |
---|
| 2610 | ]; |
---|
| 2611 | |
---|
| 2612 | const uint32_t _POSIX_Keys_Key_value_pair_maximum = |
---|
| 2613 | CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS; |
---|
| 2614 | #endif |
---|
| 2615 | |
---|
| 2616 | #if _CONFIGURE_POSIX_KEYS > 0 |
---|
| 2617 | POSIX_KEYS_INFORMATION_DEFINE( _CONFIGURE_POSIX_KEYS ); |
---|
| 2618 | #endif |
---|
| 2619 | |
---|
[e97806a] | 2620 | #if CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES > 0 |
---|
[21275b58] | 2621 | POSIX_MESSAGE_QUEUE_INFORMATION_DEFINE( |
---|
| 2622 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
| 2623 | ); |
---|
[e97806a] | 2624 | #endif |
---|
| 2625 | |
---|
| 2626 | #if CONFIGURE_MAXIMUM_POSIX_SEMAPHORES > 0 |
---|
[21275b58] | 2627 | POSIX_SEMAPHORE_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ); |
---|
[e97806a] | 2628 | #endif |
---|
| 2629 | |
---|
| 2630 | #if CONFIGURE_MAXIMUM_POSIX_SHMS > 0 |
---|
[21275b58] | 2631 | POSIX_SHM_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_POSIX_SHMS ); |
---|
[e97806a] | 2632 | #endif |
---|
| 2633 | |
---|
[88c198b] | 2634 | #if CONFIGURE_MAXIMUM_POSIX_THREADS > 0 |
---|
[21275b58] | 2635 | THREAD_INFORMATION_DEFINE( |
---|
| 2636 | _POSIX_Threads, |
---|
| 2637 | OBJECTS_POSIX_API, |
---|
| 2638 | OBJECTS_POSIX_THREADS, |
---|
| 2639 | CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 2640 | ); |
---|
[e97806a] | 2641 | #endif |
---|
| 2642 | |
---|
[5877cc3a] | 2643 | #ifdef RTEMS_POSIX_API |
---|
[e97806a] | 2644 | #if CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS > 0 |
---|
[b0e335c2] | 2645 | const uint32_t _POSIX_signals_Maximum_queued_signals = |
---|
[e97806a] | 2646 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS; |
---|
[1bf2f16] | 2647 | |
---|
| 2648 | POSIX_signals_Siginfo_node _POSIX_signals_Siginfo_nodes[ |
---|
| 2649 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
| 2650 | ]; |
---|
[e97806a] | 2651 | #endif |
---|
[fd27bae] | 2652 | |
---|
[e97806a] | 2653 | #if CONFIGURE_MAXIMUM_POSIX_TIMERS > 0 |
---|
[21275b58] | 2654 | POSIX_TIMER_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_POSIX_TIMERS ); |
---|
[e97806a] | 2655 | #endif |
---|
[5877cc3a] | 2656 | #endif |
---|
[2eba45d] | 2657 | |
---|
[e6a8410] | 2658 | const size_t _POSIX_Threads_Minimum_stack_size = |
---|
[e97806a] | 2659 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE; |
---|
| 2660 | |
---|
[6784547] | 2661 | /** |
---|
[27f071cd] | 2662 | * This variable specifies the minimum stack size for tasks in an RTEMS |
---|
| 2663 | * application. |
---|
[ecf0f4c] | 2664 | * |
---|
[27f071cd] | 2665 | * NOTE: This is left as a simple uint32_t so it can be externed as |
---|
| 2666 | * needed without requring being high enough logical to |
---|
| 2667 | * include the full configuration table. |
---|
[ecf0f4c] | 2668 | */ |
---|
[28352fae] | 2669 | uint32_t rtems_minimum_stack_size = |
---|
[ecf0f4c] | 2670 | CONFIGURE_MINIMUM_TASK_STACK_SIZE; |
---|
| 2671 | |
---|
[f4dbf37d] | 2672 | const uintptr_t _Stack_Space_size = _CONFIGURE_STACK_SPACE_SIZE; |
---|
| 2673 | |
---|
[00c7ad4] | 2674 | #if defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ |
---|
| 2675 | && defined(CONFIGURE_TASK_STACK_DEALLOCATOR) |
---|
| 2676 | #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE |
---|
| 2677 | const bool _Stack_Allocator_avoids_workspace = true; |
---|
| 2678 | #else |
---|
| 2679 | const bool _Stack_Allocator_avoids_workspace = false; |
---|
| 2680 | #endif |
---|
| 2681 | |
---|
| 2682 | #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_INIT |
---|
| 2683 | const Stack_Allocator_initialize _Stack_Allocator_initialize = |
---|
| 2684 | CONFIGURE_TASK_STACK_ALLOCATOR_INIT; |
---|
| 2685 | #else |
---|
| 2686 | const Stack_Allocator_initialize _Stack_Allocator_initialize = NULL; |
---|
| 2687 | #endif |
---|
| 2688 | |
---|
| 2689 | const Stack_Allocator_allocate _Stack_Allocator_allocate = |
---|
| 2690 | CONFIGURE_TASK_STACK_ALLOCATOR; |
---|
| 2691 | |
---|
| 2692 | const Stack_Allocator_free _Stack_Allocator_free = |
---|
| 2693 | CONFIGURE_TASK_STACK_DEALLOCATOR; |
---|
| 2694 | #elif defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ |
---|
| 2695 | || defined(CONFIGURE_TASK_STACK_DEALLOCATOR) |
---|
| 2696 | #error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined" |
---|
| 2697 | #endif |
---|
| 2698 | |
---|
[5877cc3a] | 2699 | /** |
---|
[27f071cd] | 2700 | * This is the primary Configuration Table for this application. |
---|
[5877cc3a] | 2701 | */ |
---|
[ae4f125e] | 2702 | const rtems_configuration_table Configuration = { |
---|
[5877cc3a] | 2703 | CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */ |
---|
| 2704 | CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */ |
---|
| 2705 | CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */ |
---|
| 2706 | CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */ |
---|
| 2707 | CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */ |
---|
[b4f635e] | 2708 | #ifdef CONFIGURE_UNIFIED_WORK_AREAS /* true for unified work areas */ |
---|
| 2709 | true, |
---|
| 2710 | #else |
---|
| 2711 | false, |
---|
| 2712 | #endif |
---|
[6bc63df1] | 2713 | #ifdef RTEMS_SMP |
---|
| 2714 | #ifdef _CONFIGURE_SMP_APPLICATION |
---|
| 2715 | true, |
---|
| 2716 | #else |
---|
| 2717 | false, |
---|
| 2718 | #endif |
---|
| 2719 | #endif |
---|
[6c2eedc] | 2720 | #ifdef RTEMS_SMP |
---|
[334e1d2] | 2721 | _CONFIGURE_MAXIMUM_PROCESSORS, |
---|
[6c2eedc] | 2722 | #endif |
---|
[5877cc3a] | 2723 | }; |
---|
[dca6184] | 2724 | |
---|
[2d07ce6] | 2725 | #ifdef CONFIGURE_DIRTY_MEMORY |
---|
| 2726 | RTEMS_SYSINIT_ITEM( |
---|
| 2727 | _Memory_Dirty_free_areas, |
---|
| 2728 | RTEMS_SYSINIT_DIRTY_MEMORY, |
---|
| 2729 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2730 | ); |
---|
| 2731 | #endif |
---|
| 2732 | |
---|
[8ecbc38] | 2733 | #ifdef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 2734 | const bool _Memory_Zero_before_use = true; |
---|
| 2735 | |
---|
| 2736 | RTEMS_SYSINIT_ITEM( |
---|
| 2737 | _Memory_Zero_free_areas, |
---|
| 2738 | RTEMS_SYSINIT_ZERO_MEMORY, |
---|
| 2739 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2740 | ); |
---|
| 2741 | #endif |
---|
| 2742 | |
---|
[dca6184] | 2743 | #if CONFIGURE_RECORD_PER_PROCESSOR_ITEMS > 0 |
---|
| 2744 | #if (CONFIGURE_RECORD_PER_PROCESSOR_ITEMS & (CONFIGURE_RECORD_PER_PROCESSOR_ITEMS - 1)) != 0 |
---|
| 2745 | #error "CONFIGURE_RECORD_PER_PROCESSOR_ITEMS must be a power of two" |
---|
| 2746 | #endif |
---|
| 2747 | |
---|
| 2748 | #if CONFIGURE_RECORD_PER_PROCESSOR_ITEMS < 16 |
---|
| 2749 | #error "CONFIGURE_RECORD_PER_PROCESSOR_ITEMS must be at least 16" |
---|
| 2750 | #endif |
---|
| 2751 | |
---|
[a2684c2b] | 2752 | typedef struct { |
---|
[11f196d6] | 2753 | Record_Control Control; |
---|
[dca6184] | 2754 | rtems_record_item Items[ CONFIGURE_RECORD_PER_PROCESSOR_ITEMS ]; |
---|
[a2684c2b] | 2755 | } Record_Configured_control; |
---|
[dca6184] | 2756 | |
---|
[a2684c2b] | 2757 | static Record_Configured_control _Record_Controls[ _CONFIGURE_MAXIMUM_PROCESSORS ]; |
---|
| 2758 | |
---|
| 2759 | const Record_Configuration _Record_Configuration = { |
---|
| 2760 | CONFIGURE_RECORD_PER_PROCESSOR_ITEMS, |
---|
| 2761 | &_Record_Controls[ 0 ].Control |
---|
| 2762 | }; |
---|
[dca6184] | 2763 | |
---|
| 2764 | RTEMS_SYSINIT_ITEM( |
---|
| 2765 | _Record_Initialize, |
---|
| 2766 | RTEMS_SYSINIT_RECORD, |
---|
| 2767 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2768 | ); |
---|
| 2769 | #endif |
---|
[e44ae80] | 2770 | |
---|
| 2771 | #ifdef CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION |
---|
| 2772 | RTEMS_SYSINIT_ITEM( |
---|
| 2773 | _Sysinit_Verbose, |
---|
| 2774 | RTEMS_SYSINIT_RECORD, |
---|
| 2775 | RTEMS_SYSINIT_ORDER_LAST |
---|
| 2776 | ); |
---|
| 2777 | #endif |
---|
[08bae5e6] | 2778 | #endif |
---|
| 2779 | |
---|
[06dcaf0] | 2780 | #if defined(RTEMS_SMP) |
---|
| 2781 | /* |
---|
| 2782 | * Instantiate the Per CPU information based upon the user configuration. |
---|
| 2783 | */ |
---|
| 2784 | #if defined(CONFIGURE_INIT) |
---|
[334e1d2] | 2785 | Per_CPU_Control_envelope _Per_CPU_Information[_CONFIGURE_MAXIMUM_PROCESSORS]; |
---|
[06dcaf0] | 2786 | #endif |
---|
| 2787 | |
---|
| 2788 | #endif |
---|
| 2789 | |
---|
[0ab34c90] | 2790 | /* |
---|
| 2791 | * If the user has configured a set of Classic API Initialization Tasks, |
---|
| 2792 | * then we need to install the code that runs that loop. |
---|
| 2793 | */ |
---|
| 2794 | #ifdef CONFIGURE_INIT |
---|
[d15bae6] | 2795 | #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) || \ |
---|
| 2796 | defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE) |
---|
[1ff8eca] | 2797 | RTEMS_SYSINIT_ITEM( |
---|
| 2798 | _RTEMS_tasks_Initialize_user_tasks_body, |
---|
| 2799 | RTEMS_SYSINIT_CLASSIC_USER_TASKS, |
---|
| 2800 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2801 | ); |
---|
[0ab34c90] | 2802 | #endif |
---|
| 2803 | #endif |
---|
| 2804 | |
---|
| 2805 | /* |
---|
| 2806 | * If the user has configured a set of POSIX Initialization Threads, |
---|
| 2807 | * then we need to install the code that runs that loop. |
---|
| 2808 | */ |
---|
[54f35888] | 2809 | #ifdef CONFIGURE_INIT |
---|
| 2810 | #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \ |
---|
| 2811 | defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE) |
---|
| 2812 | posix_initialization_threads_table * const |
---|
| 2813 | _Configuration_POSIX_Initialization_threads = |
---|
| 2814 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME; |
---|
| 2815 | |
---|
| 2816 | const size_t _Configuration_POSIX_Initialization_thread_count = |
---|
| 2817 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE; |
---|
| 2818 | |
---|
| 2819 | RTEMS_SYSINIT_ITEM( |
---|
| 2820 | _POSIX_Threads_Initialize_user_threads_body, |
---|
| 2821 | RTEMS_SYSINIT_POSIX_USER_THREADS, |
---|
| 2822 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2823 | ); |
---|
[0ab34c90] | 2824 | #endif |
---|
| 2825 | #endif |
---|
| 2826 | |
---|
[a31845f7] | 2827 | /* |
---|
| 2828 | * Select PCI Configuration Library |
---|
| 2829 | */ |
---|
| 2830 | #ifdef RTEMS_PCI_CONFIG_LIB |
---|
| 2831 | #ifdef CONFIGURE_INIT |
---|
| 2832 | #define PCI_LIB_NONE 0 |
---|
| 2833 | #define PCI_LIB_AUTO 1 |
---|
| 2834 | #define PCI_LIB_STATIC 2 |
---|
| 2835 | #define PCI_LIB_READ 3 |
---|
| 2836 | #define PCI_LIB_PERIPHERAL 4 |
---|
| 2837 | #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO |
---|
| 2838 | #define PCI_CFG_AUTO_LIB |
---|
| 2839 | #include <pci/cfg.h> |
---|
| 2840 | struct pci_bus pci_hb; |
---|
| 2841 | #define PCI_LIB_INIT pci_config_auto |
---|
| 2842 | #define PCI_LIB_CONFIG pci_config_auto_register |
---|
| 2843 | #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC |
---|
| 2844 | #define PCI_CFG_STATIC_LIB |
---|
| 2845 | #include <pci/cfg.h> |
---|
| 2846 | #define PCI_LIB_INIT pci_config_static |
---|
| 2847 | #define PCI_LIB_CONFIG NULL |
---|
| 2848 | /* Let user define PCI configuration (struct pci_bus pci_hb) */ |
---|
| 2849 | #elif CONFIGURE_PCI_LIB == PCI_LIB_READ |
---|
| 2850 | #define PCI_CFG_READ_LIB |
---|
| 2851 | #include <pci/cfg.h> |
---|
| 2852 | #define PCI_LIB_INIT pci_config_read |
---|
| 2853 | #define PCI_LIB_CONFIG NULL |
---|
| 2854 | struct pci_bus pci_hb; |
---|
| 2855 | #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL |
---|
| 2856 | #define PCI_LIB_INIT pci_config_peripheral |
---|
| 2857 | #define PCI_LIB_CONFIG NULL |
---|
| 2858 | /* Let user define PCI configuration (struct pci_bus pci_hb) */ |
---|
| 2859 | #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE |
---|
| 2860 | #define PCI_LIB_INIT NULL |
---|
| 2861 | #define PCI_LIB_CONFIG NULL |
---|
| 2862 | /* No PCI Configuration at all, user can use/debug access routines */ |
---|
| 2863 | #else |
---|
| 2864 | #error NO PCI LIBRARY DEFINED |
---|
| 2865 | #endif |
---|
| 2866 | |
---|
| 2867 | const int pci_config_lib_type = CONFIGURE_PCI_LIB; |
---|
| 2868 | int (*pci_config_lib_init)(void) = PCI_LIB_INIT; |
---|
| 2869 | void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG; |
---|
| 2870 | #endif |
---|
| 2871 | #endif |
---|
| 2872 | |
---|
[08bae5e6] | 2873 | #ifdef __cplusplus |
---|
| 2874 | } |
---|
| 2875 | #endif |
---|
[8486081] | 2876 | |
---|
[df0bfdf] | 2877 | /****************************************************************** |
---|
| 2878 | ****************************************************************** |
---|
| 2879 | ****************************************************************** |
---|
| 2880 | * CONFIGURATION WARNINGS AND ERROR CHECKING * |
---|
| 2881 | ****************************************************************** |
---|
| 2882 | ****************************************************************** |
---|
| 2883 | ****************************************************************** |
---|
[df49c60] | 2884 | */ |
---|
| 2885 | |
---|
| 2886 | /* |
---|
[80f9d77] | 2887 | * Make sure a task/thread of some sort is configured. |
---|
| 2888 | * |
---|
| 2889 | * When analyzing RTEMS to find the smallest possible of memory |
---|
| 2890 | * that must be allocated, you probably do want to configure 0 |
---|
| 2891 | * tasks/threads so there is a smaller set of calls to _Workspace_Allocate |
---|
| 2892 | * to analyze. |
---|
| 2893 | */ |
---|
[88c198b] | 2894 | #if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) \ |
---|
| 2895 | && CONFIGURE_MAXIMUM_TASKS == 0 \ |
---|
| 2896 | && CONFIGURE_MAXIMUM_POSIX_THREADS == 0 |
---|
| 2897 | #error "CONFIGURATION ERROR: No tasks or threads configured!!" |
---|
[df49c60] | 2898 | #endif |
---|
| 2899 | |
---|
[5aecf664] | 2900 | #ifndef RTEMS_SCHEDSIM |
---|
[df49c60] | 2901 | /* |
---|
| 2902 | * Make sure at least one of the initialization task/thread |
---|
| 2903 | * tables was defined. |
---|
| 2904 | */ |
---|
| 2905 | #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 2906 | !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \ |
---|
[80f9d77] | 2907 | !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
[168ba07] | 2908 | #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!" |
---|
[df49c60] | 2909 | #endif |
---|
[5aecf664] | 2910 | #endif |
---|
[df49c60] | 2911 | |
---|
[df0bfdf] | 2912 | /* |
---|
| 2913 | * If the user is trying to configure a multiprocessing application and |
---|
| 2914 | * RTEMS was not configured and built multiprocessing, then error out. |
---|
| 2915 | */ |
---|
| 2916 | #if defined(CONFIGURE_MP_APPLICATION) && \ |
---|
| 2917 | !defined(RTEMS_MULTIPROCESSING) |
---|
| 2918 | #error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!" |
---|
| 2919 | #endif |
---|
| 2920 | |
---|
[6784547] | 2921 | #if !defined(RTEMS_SCHEDSIM) |
---|
[e6f2b54] | 2922 | /* |
---|
| 2923 | * You must either explicitly include or exclude the clock driver. |
---|
| 2924 | * It is such a common newbie error to leave it out. Maybe this |
---|
| 2925 | * will put an end to it. |
---|
| 2926 | * |
---|
| 2927 | * NOTE: If you are using the timer driver, it is considered |
---|
| 2928 | * mutually exclusive with the clock driver because the |
---|
| 2929 | * drivers are assumed to use the same "timer" hardware |
---|
| 2930 | * on many boards. |
---|
| 2931 | */ |
---|
| 2932 | #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 2933 | !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \ |
---|
| 2934 | !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) |
---|
| 2935 | #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?" |
---|
| 2936 | #endif |
---|
[6784547] | 2937 | |
---|
[e6f2b54] | 2938 | /* |
---|
| 2939 | * Only one of the following three configuration parameters should be |
---|
| 2940 | * defined at a time. |
---|
| 2941 | */ |
---|
| 2942 | #if ((defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) + \ |
---|
| 2943 | defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) + \ |
---|
| 2944 | defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER)) > 1) |
---|
| 2945 | #error "CONFIGURATION ERROR: More than one clock/timer driver configuration parameter specified?!?" |
---|
| 2946 | #endif |
---|
[6784547] | 2947 | #endif /* !defined(RTEMS_SCHEDSIM) */ |
---|
[df0bfdf] | 2948 | |
---|
[0ab34c90] | 2949 | /* |
---|
| 2950 | * These names have been obsoleted so make the user application stop compiling |
---|
| 2951 | */ |
---|
| 2952 | #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \ |
---|
| 2953 | defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \ |
---|
| 2954 | defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \ |
---|
| 2955 | defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \ |
---|
| 2956 | defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER) |
---|
| 2957 | #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete" |
---|
| 2958 | #endif |
---|
| 2959 | |
---|
[80f9d77] | 2960 | /* |
---|
| 2961 | * Validate the configured maximum priority |
---|
| 2962 | */ |
---|
| 2963 | #if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \ |
---|
| 2964 | (CONFIGURE_MAXIMUM_PRIORITY != 7) && \ |
---|
| 2965 | (CONFIGURE_MAXIMUM_PRIORITY != 15) && \ |
---|
| 2966 | (CONFIGURE_MAXIMUM_PRIORITY != 31) && \ |
---|
| 2967 | (CONFIGURE_MAXIMUM_PRIORITY != 63) && \ |
---|
| 2968 | (CONFIGURE_MAXIMUM_PRIORITY != 127) && \ |
---|
| 2969 | (CONFIGURE_MAXIMUM_PRIORITY != 255)) |
---|
| 2970 | #error "Maximum priority is not 1 less than a power of 2 between 4 and 256" |
---|
| 2971 | #endif |
---|
[28352fae] | 2972 | |
---|
[80f9d77] | 2973 | #if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM) |
---|
| 2974 | #error "Maximum priority configured higher than supported by target." |
---|
| 2975 | #endif |
---|
| 2976 | |
---|
[68f339b6] | 2977 | #ifdef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
| 2978 | #warning "The CONFIGURE_HAS_OWN_CONFIGURATION_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 2979 | #endif |
---|
| 2980 | |
---|
[e6f2b54] | 2981 | #ifdef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 2982 | #warning "The CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 2983 | #endif |
---|
| 2984 | |
---|
[bd5cec41] | 2985 | #ifdef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE |
---|
| 2986 | #warning "The CONFIGURE_HAS_OWN_FILESYSTEM_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 2987 | #endif |
---|
| 2988 | |
---|
[5fa0a1f6] | 2989 | #ifdef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
| 2990 | #warning "The CONFIGURE_HAS_OWN_MOUNT_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 2991 | #endif |
---|
| 2992 | |
---|
[d24b301] | 2993 | #ifdef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
| 2994 | #warning "The CONFIGURE_HAS_OWN_MOUNT_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 2995 | #endif |
---|
| 2996 | |
---|
[53b6484] | 2997 | #ifdef CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
| 2998 | #warning "The CONFIGURE_NUMBER_OF_TERMIOS_PORTS configuration option is obsolete since RTEMS 5.1" |
---|
[2c12262] | 2999 | #endif |
---|
| 3000 | |
---|
[88c198b] | 3001 | #ifdef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
| 3002 | #warning "The CONFIGURE_MAXIMUM_ADA_TASKS configuration option is obsolete since RTEMS 5.1" |
---|
| 3003 | #endif |
---|
| 3004 | |
---|
| 3005 | #ifdef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
| 3006 | #warning "The CONFIGURE_MAXIMUM_FAKE_ADA_TASKS configuration option is obsolete since RTEMS 5.1" |
---|
| 3007 | #endif |
---|
| 3008 | |
---|
[46865542] | 3009 | #ifdef CONFIGURE_MAXIMUM_MRSP_SEMAPHORES |
---|
| 3010 | #warning "The CONFIGURE_MAXIMUM_MRSP_SEMAPHORES configuration option is obsolete since RTEMS 5.1" |
---|
| 3011 | #endif |
---|
| 3012 | |
---|
[9c0cefb] | 3013 | #ifdef CONFIGURE_MAXIMUM_POSIX_BARRIERS |
---|
[9526b034] | 3014 | #warning "The CONFIGURE_MAXIMUM_POSIX_BARRIERS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3015 | #endif |
---|
| 3016 | |
---|
| 3017 | #ifdef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
[9526b034] | 3018 | #warning "The CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3019 | #endif |
---|
| 3020 | |
---|
[c8982e5] | 3021 | #ifdef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS |
---|
[9526b034] | 3022 | #warning "The CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3023 | #endif |
---|
| 3024 | |
---|
| 3025 | #ifdef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
[9526b034] | 3026 | #warning "The CONFIGURE_MAXIMUM_POSIX_MUTEXES configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3027 | #endif |
---|
| 3028 | |
---|
| 3029 | #ifdef CONFIGURE_MAXIMUM_POSIX_RWLOCKS |
---|
[9526b034] | 3030 | #warning "The CONFIGURE_MAXIMUM_POSIX_RWLOCKS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3031 | #endif |
---|
| 3032 | |
---|
| 3033 | #ifdef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS |
---|
[9526b034] | 3034 | #warning "The CONFIGURE_MAXIMUM_POSIX_SPINLOCKS configuration option is obsolete since RTEMS 5.1" |
---|
[ade17392] | 3035 | #endif |
---|
| 3036 | |
---|
[a346ebba] | 3037 | #ifdef CONFIGURE_MAXIMUM_PTYS |
---|
| 3038 | #warning "The CONFIGURE_MAXIMUM_PTYS configuration option is obsolete since RTEMS 5.1" |
---|
| 3039 | #endif |
---|
| 3040 | |
---|
[53b6484] | 3041 | #ifdef CONFIGURE_TERMIOS_DISABLED |
---|
| 3042 | #warning "The CONFIGURE_TERMIOS_DISABLED configuration option is obsolete since RTEMS 5.1" |
---|
| 3043 | #endif |
---|
| 3044 | |
---|
[b5c9064] | 3045 | /* |
---|
| 3046 | * POSIX Key pair shouldn't be less than POSIX Key, which is highly |
---|
| 3047 | * likely to be error. |
---|
| 3048 | */ |
---|
[e6c87f7] | 3049 | #if (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) && \ |
---|
| 3050 | (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS != 0) |
---|
| 3051 | #if (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS < CONFIGURE_MAXIMUM_POSIX_KEYS) |
---|
| 3052 | #error "Fewer POSIX Key pairs than POSIX Key!" |
---|
| 3053 | #endif |
---|
[b5c9064] | 3054 | #endif |
---|
| 3055 | |
---|
[69be1a22] | 3056 | /* |
---|
| 3057 | * IMFS block size for in memory files (memfiles) must be a power of |
---|
| 3058 | * two between 16 and 512 inclusive. |
---|
| 3059 | */ |
---|
| 3060 | #if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \ |
---|
| 3061 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \ |
---|
| 3062 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \ |
---|
| 3063 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \ |
---|
| 3064 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \ |
---|
| 3065 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512)) |
---|
| 3066 | #error "IMFS Memfile block size must be a power of 2 between 16 and 512" |
---|
| 3067 | #endif |
---|
| 3068 | |
---|
[369bf2c4] | 3069 | #ifdef CONFIGURE_ENABLE_GO |
---|
| 3070 | #warning "The CONFIGURE_ENABLE_GO configuration option is obsolete since RTEMS 5.1" |
---|
| 3071 | #endif |
---|
| 3072 | |
---|
[88c198b] | 3073 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
| 3074 | #warning "The CONFIGURE_GNAT_RTEMS configuration option is obsolete since RTEMS 5.1" |
---|
| 3075 | #endif |
---|
| 3076 | |
---|
[369bf2c4] | 3077 | #ifdef CONFIGURE_MAXIMUM_GOROUTINES |
---|
| 3078 | #warning "The CONFIGURE_MAXIMUM_GOROUTINES configuration option is obsolete since RTEMS 5.1" |
---|
| 3079 | #endif |
---|
| 3080 | |
---|
| 3081 | #ifdef CONFIGURE_MAXIMUM_GO_CHANNELS |
---|
| 3082 | #warning "The CONFIGURE_MAXIMUM_GO_CHANNELS configuration option is obsolete since RTEMS 5.1" |
---|
| 3083 | #endif |
---|
[69be1a22] | 3084 | |
---|
[08bae5e6] | 3085 | #endif |
---|
| 3086 | /* end of include file */ |
---|