RTEMS CPU Kit with SuperCore  4.11.3
confdefs.h
Go to the documentation of this file.
1 
13 /*
14  * COPYRIGHT (c) 1989-2015.
15  * On-Line Applications Research Corporation (OAR).
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifndef __CONFIGURATION_TEMPLATE_h
23 #define __CONFIGURATION_TEMPLATE_h
24 
25 /*
26  * Include the executive's configuration
27  */
28 #include <rtems.h>
29 #include <rtems/score/apimutex.h>
30 #include <rtems/score/percpu.h>
31 #include <rtems/score/wkspace.h>
32 
33 #ifdef CONFIGURE_DISABLE_BSP_SETTINGS
34  #undef BSP_DEFAULT_UNIFIED_WORK_AREAS
35  #undef BSP_IDLE_TASK_BODY
36  #undef BSP_IDLE_TASK_STACK_SIZE
37  #undef BSP_INITIAL_EXTENSION
38  #undef BSP_INTERRUPT_STACK_SIZE
39  #undef BSP_MAXIMUM_DEVICES
40  #undef BSP_ZERO_WORKSPACE_AUTOMATICALLY
41  #undef CONFIGURE_BSP_PREREQUISITE_DRIVERS
42  #undef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
43 #else
44  #include <bsp.h>
45 #endif
46 
47 #ifdef RTEMS_NEWLIB
48  #include <sys/reent.h>
49 #endif
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
83 
84 #if defined(RTEMS_MULTIPROCESSING)
85 
88  extern rtems_multiprocessing_table Multiprocessing_configuration;
89 #endif
90 
91 #ifdef RTEMS_POSIX_API
92 
96 #endif
97 
102 #ifdef RTEMS_SCHEDSIM
103  #undef RTEMS_NEWLIB
104 #endif
105 
106 #if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
107  #define CONFIGURE_NEWLIB_EXTENSION 1
108 #else
109  #define CONFIGURE_NEWLIB_EXTENSION 0
110 #endif
111 
112 #ifndef RTEMS_SCHEDSIM
113 #include <rtems/libio_.h>
114 
115 #ifdef CONFIGURE_INIT
116 const rtems_libio_helper rtems_libio_init_helper =
117  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
118  rtems_libio_helper_null;
119  #else
121  #endif
122 
123 const rtems_libio_helper rtems_libio_post_driver_helper =
124  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
125  rtems_libio_helper_null;
126  #else
127  rtems_libio_post_driver;
128  #endif
129 
130 const rtems_libio_helper rtems_libio_exit_helper =
131  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
132  rtems_libio_helper_null;
133  #else
134  rtems_libio_exit;
135  #endif
136 
137 const rtems_libio_helper rtems_fs_init_helper =
138  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
139  rtems_libio_helper_null;
140  #else
142  #endif
143 #endif
144 #endif
145 
151 #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
152  #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
153 #endif
154 
158 #define CONFIGURE_LIBIO_SEMAPHORES 1
159 
163 #define CONFIGURE_LIBIO_POSIX_KEYS 1
164 
168 #ifdef RTEMS_DRVMGR_STARTUP
169  #define CONFIGURE_DRVMGR_SEMAPHORES 1
170 #else
171  #define CONFIGURE_DRVMGR_SEMAPHORES 0
172 #endif
173 
174 #ifdef CONFIGURE_INIT
176 
181  const uint32_t rtems_libio_number_iops = RTEMS_ARRAY_SIZE(rtems_libio_iops);
182 #endif
183 
189 #ifdef CONFIGURE_TERMIOS_DISABLED
190  #define CONFIGURE_TERMIOS_SEMAPHORES 0
191 #else
192 
196  #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
197  #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
198  #endif
199 
204  #define CONFIGURE_TERMIOS_SEMAPHORES \
205  ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
206 #endif
207 
212 #ifndef CONFIGURE_MAXIMUM_PTYS
213  #define CONFIGURE_MAXIMUM_PTYS 0
214 #endif
215 
220 #ifdef CONFIGURE_INIT
222 #else
223  extern int rtems_telnetd_maximum_ptys;
224 #endif
225 
226 #if defined(RTEMS_SMP)
227  /*
228  * If configured for SMP, then we need to know the maximum CPU cores.
229  */
230  #if !defined(CONFIGURE_SMP_APPLICATION)
231  #if !defined(CONFIGURE_SMP_MAXIMUM_PROCESSORS)
232  #define CONFIGURE_SMP_MAXIMUM_PROCESSORS 1
233  #endif
234  #else
235  #if !defined(CONFIGURE_SMP_MAXIMUM_PROCESSORS)
236  #error "CONFIGURE_SMP_MAXIMUM_PROCESSORS not specified for SMP Application"
237  #endif
238  #endif
239 #endif
240 
241 /*
242  * This sets up the resources for the FIFOs/pipes.
243  */
244 
248 #if !defined(CONFIGURE_MAXIMUM_FIFOS)
249  #define CONFIGURE_MAXIMUM_FIFOS 0
250 #endif
251 
255 #if !defined(CONFIGURE_MAXIMUM_PIPES)
256  #define CONFIGURE_MAXIMUM_PIPES 0
257 #endif
258 
265 #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
266  #define CONFIGURE_BARRIERS_FOR_FIFOS \
267  (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
268 #else
269  #define CONFIGURE_BARRIERS_FOR_FIFOS 0
270 #endif
271 
278 #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
279  #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
280  (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
281 #else
282  #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
283 #endif
284 
324 #ifdef CONFIGURE_INIT
325 
326  /*
327  * Include all file systems. Do this before checking if the filesystem has
328  * been disabled.
329  */
330  #ifdef CONFIGURE_FILESYSTEM_ALL
331  #define CONFIGURE_FILESYSTEM_IMFS
332  #define CONFIGURE_FILESYSTEM_DEVFS
333  #define CONFIGURE_FILESYSTEM_TFTPFS
334  #define CONFIGURE_FILESYSTEM_FTPFS
335  #define CONFIGURE_FILESYSTEM_NFS
336  #define CONFIGURE_FILESYSTEM_DOSFS
337  #define CONFIGURE_FILESYSTEM_RFS
338  #define CONFIGURE_FILESYSTEM_JFFS2
339  #endif
340 
341  /*
342  * If disabling the file system, give a compile error if the user has
343  * configured other filesystem parameters.
344  */
345  #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
346  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
347  #error "Filesystem disabled and a base filesystem configured."
348  #endif
349 
350  #if defined(CONFIGURE_FILESYSTEM_IMFS) || \
351  defined(CONFIGURE_FILESYSTEM_DEVFS) || \
352  defined(CONFIGURE_FILESYSTEM_TFTPFS) || \
353  defined(CONFIGURE_FILESYSTEM_FTPFS) || \
354  defined(CONFIGURE_FILESYSTEM_NFS) || \
355  defined(CONFIGURE_FILESYSTEM_DOSFS) || \
356  defined(CONFIGURE_FILESYSTEM_RFS) || \
357  defined(CONFIGURE_FILESYSTEM_JFFS2)
358  #error "Filesystem disabled and a filesystem configured."
359  #endif
360  #endif
361 
362  /*
363  * If the base filesystem is DEVFS define it else define IMFS.
364  * We will have either DEVFS or IMFS defined after this.
365  */
366  #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
367  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
368  #define CONFIGURE_FILESYSTEM_DEVFS
369  #endif
370  #endif
371 
372 #endif
373 
374 #ifndef RTEMS_SCHEDSIM
375 
378 #include <rtems/imfs.h>
379 
386 #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
387  #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
388  IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
389 #endif
390 
394 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
395  defined(CONFIGURE_FILESYSTEM_IMFS)
396  #define CONFIGURE_FILESYSTEM_ENTRY_IMFS \
397  { RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize }
398 #endif
399 #endif
400 
401 #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
402  #define CONFIGURE_IMFS_DISABLE_CHMOD
403  #define CONFIGURE_IMFS_DISABLE_CHOWN
404  #define CONFIGURE_IMFS_DISABLE_UTIME
405  #define CONFIGURE_IMFS_DISABLE_LINK
406  #define CONFIGURE_IMFS_DISABLE_SYMLINK
407  #define CONFIGURE_IMFS_DISABLE_READLINK
408  #define CONFIGURE_IMFS_DISABLE_RENAME
409  #define CONFIGURE_IMFS_DISABLE_UNMOUNT
410 #endif
411 
415 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \
416  defined(CONFIGURE_FILESYSTEM_DEVFS)
417 #include <rtems/devfs.h>
418  #define CONFIGURE_FILESYSTEM_ENTRY_DEVFS \
419  { RTEMS_FILESYSTEM_TYPE_DEVFS, devFS_initialize }
420 #endif
421 
422 #ifdef RTEMS_NETWORKING
423 
426  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \
427  defined(CONFIGURE_FILESYSTEM_FTPFS)
428  #include <rtems/ftpfs.h>
429  #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS \
430  { RTEMS_FILESYSTEM_TYPE_FTPFS, rtems_ftpfs_initialize }
431  #endif
432 
436  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \
437  defined(CONFIGURE_FILESYSTEM_TFTPFS)
438  #include <rtems/tftp.h>
439  #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS \
440  { RTEMS_FILESYSTEM_TYPE_TFTPFS, rtems_tftpfs_initialize }
441  #endif
442 
446  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) && \
447  defined(CONFIGURE_FILESYSTEM_NFS)
448  #include <librtemsNfs.h>
449  #if !defined(CONFIGURE_MAXIMUM_NFS_MOUNTS)
450  #define CONFIGURE_MAXIMUM_NFS_MOUNTS 1
451  #endif
452  #define CONFIGURE_FILESYSTEM_ENTRY_NFS \
453  { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize }
454  #define CONFIGURE_SEMAPHORES_FOR_NFS ((CONFIGURE_MAXIMUM_NFS_MOUNTS * 2) + 1)
455  #else
456  #define CONFIGURE_SEMAPHORES_FOR_NFS 0
457  #endif
458 #else
459  #define CONFIGURE_SEMAPHORES_FOR_NFS 0
460 #endif
461 
465 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \
466  defined(CONFIGURE_FILESYSTEM_DOSFS)
467  #include <rtems/dosfs.h>
468  #if !defined(CONFIGURE_MAXIMUM_DOSFS_MOUNTS)
469  #define CONFIGURE_MAXIMUM_DOSFS_MOUNTS 1
470  #endif
471  #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS \
472  { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize }
473  #define CONFIGURE_SEMAPHORES_FOR_DOSFS CONFIGURE_MAXIMUM_DOSFS_MOUNTS
474 #else
475  #define CONFIGURE_SEMAPHORES_FOR_DOSFS 0
476 #endif
477 
481 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \
482  defined(CONFIGURE_FILESYSTEM_RFS)
483  #include <rtems/rtems-rfs.h>
484  #if !defined(CONFIGURE_MAXIMUM_RFS_MOUNTS)
485  #define CONFIGURE_MAXIMUM_RFS_MOUNTS 1
486  #endif
487  #define CONFIGURE_FILESYSTEM_ENTRY_RFS \
488  { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise }
489  #define CONFIGURE_SEMAPHORES_FOR_RFS CONFIGURE_MAXIMUM_RFS_MOUNTS
490 #else
491  #define CONFIGURE_SEMAPHORES_FOR_RFS 0
492 #endif
493 
497 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2) && \
498  defined(CONFIGURE_FILESYSTEM_JFFS2)
499  #include <rtems/jffs2.h>
500  #if !defined(CONFIGURE_MAXIMUM_JFFS2_MOUNTS)
501  #define CONFIGURE_MAXIMUM_JFFS2_MOUNTS 1
502  #endif
503  #define CONFIGURE_FILESYSTEM_ENTRY_JFFS2 \
504  { RTEMS_FILESYSTEM_TYPE_JFFS2, rtems_jffs2_initialize }
505  #define CONFIGURE_SEMAPHORES_FOR_JFFS2 CONFIGURE_MAXIMUM_JFFS2_MOUNTS
506 #else
507  #define CONFIGURE_SEMAPHORES_FOR_JFFS2 0
508 #endif
509 
516 #define CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS \
517  (CONFIGURE_SEMAPHORES_FOR_FIFOS + \
518  CONFIGURE_SEMAPHORES_FOR_NFS + \
519  CONFIGURE_SEMAPHORES_FOR_DOSFS + \
520  CONFIGURE_SEMAPHORES_FOR_RFS + \
521  CONFIGURE_SEMAPHORES_FOR_JFFS2)
522 
523 #ifdef CONFIGURE_INIT
524 
534  #ifdef CONFIGURE_FILESYSTEM_DEVFS
535  #ifndef CONFIGURE_MAXIMUM_DEVICES
536  #if defined(BSP_MAXIMUM_DEVICES)
537  #define CONFIGURE_MAXIMUM_DEVICES BSP_MAXIMUM_DEVICES
538  #else
539  #define CONFIGURE_MAXIMUM_DEVICES 4
540  #endif
541  #endif
542  #include <rtems/devfs.h>
543  #endif
544 
548  #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL }
549 
550 #ifndef RTEMS_SCHEDSIM
551  #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && \
552  !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
553  int imfs_rq_memfile_bytes_per_block =
555  #endif
556 
561  #if !defined(CONFIGURE_HAS_OWN_FILESYSTEM_TABLE) && \
562  !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
564  #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
565  { "/", IMFS_initialize_support },
566  #endif
567  #if defined(CONFIGURE_FILESYSTEM_IMFS) && \
568  defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS)
569  CONFIGURE_FILESYSTEM_ENTRY_IMFS,
570  #endif
571  #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \
572  defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS)
573  CONFIGURE_FILESYSTEM_ENTRY_DEVFS,
574  #endif
575  #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \
576  defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS)
577  CONFIGURE_FILESYSTEM_ENTRY_TFTPFS,
578  #endif
579  #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \
580  defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS)
581  CONFIGURE_FILESYSTEM_ENTRY_FTPFS,
582  #endif
583  #if defined(CONFIGURE_FILESYSTEM_NFS) && \
584  defined(CONFIGURE_FILESYSTEM_ENTRY_NFS)
585  CONFIGURE_FILESYSTEM_ENTRY_NFS,
586  #endif
587  #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \
588  defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS)
589  CONFIGURE_FILESYSTEM_ENTRY_DOSFS,
590  #endif
591  #if defined(CONFIGURE_FILESYSTEM_RFS) && \
592  defined(CONFIGURE_FILESYSTEM_ENTRY_RFS)
593  CONFIGURE_FILESYSTEM_ENTRY_RFS,
594  #endif
595  #if defined(CONFIGURE_FILESYSTEM_JFFS2) && \
596  defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2)
597  CONFIGURE_FILESYSTEM_ENTRY_JFFS2,
598  #endif
599  CONFIGURE_FILESYSTEM_NULL
600  };
601  #endif
602 
603  #if !defined(CONFIGURE_HAS_OWN_MOUNT_TABLE) && \
604  !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
605  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
606  static devFS_node devFS_root_filesystem_nodes [CONFIGURE_MAXIMUM_DEVICES];
607  static const devFS_data devFS_root_filesystem_data = {
608  devFS_root_filesystem_nodes,
609  CONFIGURE_MAXIMUM_DEVICES
610  };
611  #else
612  static IMFS_fs_info_t _Configure_IMFS_fs_info;
613 
614  static const rtems_filesystem_operations_table _Configure_IMFS_ops = {
618  #ifdef CONFIGURE_IMFS_DISABLE_LINK
620  #else
621  IMFS_link,
622  #endif
624  #ifdef CONFIGURE_IMFS_DISABLE_MKNOD
626  #else
627  IMFS_mknod,
628  #endif
629  #ifdef CONFIGURE_IMFS_DISABLE_RMNOD
631  #else
632  IMFS_rmnod,
633  #endif
634  #ifdef CONFIGURE_IMFS_DISABLE_CHMOD
636  #else
637  IMFS_fchmod,
638  #endif
639  #ifdef CONFIGURE_IMFS_DISABLE_CHOWN
641  #else
642  IMFS_chown,
643  #endif
646  #ifdef CONFIGURE_IMFS_DISABLE_MOUNT
648  #else
649  IMFS_mount,
650  #endif
651  #ifdef CONFIGURE_IMFS_DISABLE_UNMOUNT
653  #else
654  IMFS_unmount,
655  #endif
657  #ifdef CONFIGURE_IMFS_DISABLE_UTIME
659  #else
660  IMFS_utime,
661  #endif
662  #ifdef CONFIGURE_IMFS_DISABLE_SYMLINK
664  #else
665  IMFS_symlink,
666  #endif
667  #ifdef CONFIGURE_IMFS_DISABLE_READLINK
669  #else
671  #endif
672  #ifdef CONFIGURE_IMFS_DISABLE_RENAME
674  #else
675  IMFS_rename,
676  #endif
678  };
679 
680  static const IMFS_mknod_controls _Configure_IMFS_mknod_controls = {
681  #ifdef CONFIGURE_IMFS_DISABLE_READDIR
682  &IMFS_mknod_control_dir_minimal,
683  #else
684  &IMFS_mknod_control_dir_default,
685  #endif
686  &IMFS_mknod_control_device,
687  #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_FILE
688  &IMFS_mknod_control_enosys,
689  #else
690  &IMFS_mknod_control_memfile,
691  #endif
692  #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
693  &IMFS_mknod_control_fifo
694  #else
695  &IMFS_mknod_control_enosys
696  #endif
697  };
698 
699  static const IMFS_mount_data _Configure_IMFS_mount_data = {
700  &_Configure_IMFS_fs_info,
701  &_Configure_IMFS_ops,
702  &_Configure_IMFS_mknod_controls
703  };
704  #endif
705 
707  rtems_filesystem_root_configuration = {
708  NULL,
709  NULL,
710  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
711  RTEMS_FILESYSTEM_TYPE_DEVFS,
712  #else
713  "/",
714  #endif
715  RTEMS_FILESYSTEM_READ_WRITE,
716  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
717  &devFS_root_filesystem_data
718  #else
719  &_Configure_IMFS_mount_data
720  #endif
721  };
722  #endif
723 
724 #endif
725 #endif
726  /* end of file system group */
727 
728 /*
729  * STACK_CHECKER_ON was still available in 4.9 so give a warning for now.
730  */
731 #if defined(STACK_CHECKER_ON)
732  #define CONFIGURE_STACK_CHECKER_ENABLED
733  #warning "STACK_CHECKER_ON deprecated -- use CONFIGURE_STACK_CHECKER_ENABLED"
734 #endif
735 
739 #ifdef CONFIGURE_STACK_CHECKER_ENABLED
740  #define CONFIGURE_STACK_CHECKER_EXTENSION 1
741 #else
742  #define CONFIGURE_STACK_CHECKER_EXTENSION 0
743 #endif
744 
775 #ifndef CONFIGURE_MAXIMUM_PRIORITY
776  #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
777 #endif
778 
811 #if !defined(CONFIGURE_SCHEDULER_USER) && \
812  !defined(CONFIGURE_SCHEDULER_PRIORITY) && \
813  !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) && \
814  !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) && \
815  !defined(CONFIGURE_SCHEDULER_SIMPLE) && \
816  !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \
817  !defined(CONFIGURE_SCHEDULER_EDF) && \
818  !defined(CONFIGURE_SCHEDULER_CBS)
819  #if defined(RTEMS_SMP) && defined(CONFIGURE_SMP_APPLICATION)
820 
824  #define CONFIGURE_SCHEDULER_PRIORITY_SMP
825  #else
826 
830  #define CONFIGURE_SCHEDULER_PRIORITY
831  #endif
832 #endif
833 
834 #include <rtems/scheduler.h>
835 
836 /*
837  * If the Priority Scheduler is selected, then configure for it.
838  */
839 #if defined(CONFIGURE_SCHEDULER_PRIORITY)
840  #if !defined(CONFIGURE_SCHEDULER_NAME)
841 
842  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'D', ' ')
843  #endif
844 
845  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
846 
847  #define CONFIGURE_SCHEDULER_CONTEXT \
848  RTEMS_SCHEDULER_CONTEXT_PRIORITY( \
849  dflt, \
850  CONFIGURE_MAXIMUM_PRIORITY + 1 \
851  )
852 
854  #define CONFIGURE_SCHEDULER_CONTROLS \
855  RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME)
856  #endif
857 #endif
858 
859 /*
860  * If the Deterministic Priority SMP Scheduler is selected, then configure for
861  * it.
862  */
863 #if defined(CONFIGURE_SCHEDULER_PRIORITY_SMP)
864  #if !defined(CONFIGURE_SCHEDULER_NAME)
865 
866  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'D', ' ')
867  #endif
868 
869  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
870 
871  #define CONFIGURE_SCHEDULER_CONTEXT \
872  RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( \
873  dflt, \
874  CONFIGURE_MAXIMUM_PRIORITY + 1 \
875  )
876 
878  #define CONFIGURE_SCHEDULER_CONTROLS \
879  RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
880  #endif
881 #endif
882 
883 /*
884  * If the Deterministic Priority Affinity SMP Scheduler is selected, then configure for
885  * it.
886  */
887 #if defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP)
888  #if !defined(CONFIGURE_SCHEDULER_NAME)
889 
890  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'A', ' ')
891  #endif
892 
893  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
894 
895  #define CONFIGURE_SCHEDULER_CONTEXT \
896  RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( \
897  dflt, \
898  CONFIGURE_MAXIMUM_PRIORITY + 1 \
899  )
900 
901  #define CONFIGURE_SCHEDULER_CONTROLS \
902  RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( \
903  dflt, \
904  CONFIGURE_SCHEDULER_NAME \
905  )
906  #endif
907 #endif
908 
909 /*
910  * If the Simple Priority Scheduler is selected, then configure for it.
911  */
912 #if defined(CONFIGURE_SCHEDULER_SIMPLE)
913  #if !defined(CONFIGURE_SCHEDULER_NAME)
914 
915  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'S', ' ')
916  #endif
917 
918  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
919 
920  #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_SIMPLE(dflt)
921 
923  #define CONFIGURE_SCHEDULER_CONTROLS \
924  RTEMS_SCHEDULER_CONTROL_SIMPLE(dflt, CONFIGURE_SCHEDULER_NAME)
925  #endif
926 #endif
927 
928 /*
929  * If the Simple SMP Priority Scheduler is selected, then configure for it.
930  */
931 #if defined(CONFIGURE_SCHEDULER_SIMPLE_SMP)
932  #if !defined(CONFIGURE_SCHEDULER_NAME)
933 
934  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'S', ' ')
935  #endif
936 
937  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
938 
939  #define CONFIGURE_SCHEDULER_CONTEXT \
940  RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(dflt)
941 
943  #define CONFIGURE_SCHEDULER_CONTROLS \
944  RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
945  #endif
946 #endif
947 
948 /*
949  * If the EDF Scheduler is selected, then configure for it.
950  */
951 #if defined(CONFIGURE_SCHEDULER_EDF)
952  #if !defined(CONFIGURE_SCHEDULER_NAME)
953 
954  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'E', 'D', 'F')
955  #endif
956 
957  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
958 
959  #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_EDF(dflt)
960 
962  #define CONFIGURE_SCHEDULER_CONTROLS \
963  RTEMS_SCHEDULER_CONTROL_EDF(dflt, CONFIGURE_SCHEDULER_NAME)
964  #endif
965 #endif
966 
967 /*
968  * If the CBS Scheduler is selected, then configure for it.
969  */
970 #if defined(CONFIGURE_SCHEDULER_CBS)
971  #if !defined(CONFIGURE_SCHEDULER_NAME)
972 
973  #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'C', 'B', 'S')
974  #endif
975 
976  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
977 
978  #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_CBS(dflt)
979 
981  #define CONFIGURE_SCHEDULER_CONTROLS \
982  RTEMS_SCHEDULER_CONTROL_CBS(dflt, CONFIGURE_SCHEDULER_NAME)
983  #endif
984 
985  #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS
986  #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS
987  #endif
988 
989  #ifdef CONFIGURE_INIT
990  const uint32_t _Scheduler_CBS_Maximum_servers =
991  CONFIGURE_CBS_MAXIMUM_SERVERS;
992 
994  _Scheduler_CBS_Server_list[ CONFIGURE_CBS_MAXIMUM_SERVERS ];
995  #endif
996 #endif
997 
998 /*
999  * Set up the scheduler entry points table. The scheduling code uses
1000  * this code to know which scheduler is configured by the user.
1001  */
1002 #ifdef CONFIGURE_INIT
1003  #if defined(CONFIGURE_SCHEDULER_CONTEXT)
1005  #endif
1006 
1009  };
1010 
1011  #if defined(RTEMS_SMP)
1012  const size_t _Scheduler_Count =
1013  RTEMS_ARRAY_SIZE( _Scheduler_Table );
1014 
1015  const Scheduler_Assignment _Scheduler_Assignments[] = {
1016  #if defined(CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS)
1017  CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS
1018  #else
1019  #define CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT \
1020  RTEMS_SCHEDULER_ASSIGN( \
1021  0, \
1022  RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
1023  )
1024  CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1025  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 2
1026  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1027  #endif
1028  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 3
1029  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1030  #endif
1031  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 4
1032  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1033  #endif
1034  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 5
1035  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1036  #endif
1037  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 6
1038  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1039  #endif
1040  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 7
1041  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1042  #endif
1043  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 8
1044  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1045  #endif
1046  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 9
1047  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1048  #endif
1049  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 10
1050  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1051  #endif
1052  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 11
1053  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1054  #endif
1055  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 12
1056  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1057  #endif
1058  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 13
1059  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1060  #endif
1061  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 14
1062  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1063  #endif
1064  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 15
1065  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1066  #endif
1067  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 16
1068  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1069  #endif
1070  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 17
1071  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1072  #endif
1073  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 18
1074  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1075  #endif
1076  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 19
1077  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1078  #endif
1079  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 20
1080  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1081  #endif
1082  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 21
1083  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1084  #endif
1085  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 22
1086  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1087  #endif
1088  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 23
1089  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1090  #endif
1091  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 24
1092  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1093  #endif
1094  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 25
1095  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1096  #endif
1097  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 26
1098  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1099  #endif
1100  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 27
1101  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1102  #endif
1103  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 28
1104  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1105  #endif
1106  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 29
1107  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1108  #endif
1109  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 30
1110  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1111  #endif
1112  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 31
1113  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1114  #endif
1115  #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 32
1116  , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1117  #endif
1118  #undef CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
1119  #endif
1120  };
1121 
1122  RTEMS_STATIC_ASSERT(
1123  CONFIGURE_SMP_MAXIMUM_PROCESSORS
1124  == RTEMS_ARRAY_SIZE( _Scheduler_Assignments ),
1125  _Scheduler_Assignments
1126  );
1127  #endif
1128 #endif
1129  /* end of Scheduler Configuration */
1130 
1141 /*
1142  * If you said the IDLE task was going to do application initialization
1143  * and didn't override the IDLE body, then something is amiss.
1144  */
1145 #if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \
1146  !defined(CONFIGURE_IDLE_TASK_BODY))
1147  #error "CONFIGURE_ERROR: You did not override the IDLE task body."
1148 #endif
1149 
1158 #ifndef CONFIGURE_IDLE_TASK_BODY
1159  #if defined(BSP_IDLE_TASK_BODY)
1160  #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
1161  #elif (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
1162  #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
1163  #else
1164  /* only instantiate and compile if used */
1165  #ifdef CONFIGURE_INIT
1166  void *_Thread_Idle_body(uintptr_t ignored)
1167  {
1168  for( ; ; ) ;
1169  return 0; /* to avoid warning */
1170  }
1171  #endif
1172  #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body
1173  #endif
1174 #endif
1175  /* end of IDLE thread configuration */
1176 
1188 #ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE
1189  #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE
1190 #endif
1191 
1196 #define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE \
1197  (2 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1198 
1205 #ifndef CONFIGURE_IDLE_TASK_STACK_SIZE
1206  #ifdef BSP_IDLE_TASK_STACK_SIZE
1207  #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE
1208  #else
1209  #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
1210  #endif
1211 #endif
1212 #if CONFIGURE_IDLE_TASK_STACK_SIZE < CONFIGURE_MINIMUM_TASK_STACK_SIZE
1213  #error "CONFIGURE_IDLE_TASK_STACK_SIZE less than CONFIGURE_MINIMUM_TASK_STACK_SIZE"
1214 #endif
1215 
1222 #ifndef CONFIGURE_INTERRUPT_STACK_SIZE
1223  #ifdef BSP_INTERRUPT_STACK_SIZE
1224  #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE
1225  #else
1226  #define CONFIGURE_INTERRUPT_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
1227  #endif
1228 #endif
1229 
1237 #if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
1238  #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
1239 #else
1240  #define CONFIGURE_INTERRUPT_STACK_MEMORY \
1241  _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE )
1242 #endif
1243 
1247 #ifndef CONFIGURE_TASK_STACK_ALLOCATOR_INIT
1248  #define CONFIGURE_TASK_STACK_ALLOCATOR_INIT NULL
1249 #endif
1250 
1251 /*
1252  * Configure the very much optional task stack allocator and deallocator.
1253  */
1254 #if !defined(CONFIGURE_TASK_STACK_ALLOCATOR) \
1255  && !defined(CONFIGURE_TASK_STACK_DEALLOCATOR)
1256 
1259  #define CONFIGURE_TASK_STACK_ALLOCATOR _Workspace_Allocate
1260 
1263  #define CONFIGURE_TASK_STACK_DEALLOCATOR _Workspace_Free
1264 #elif (defined(CONFIGURE_TASK_STACK_ALLOCATOR) \
1265  && !defined(CONFIGURE_TASK_STACK_DEALLOCATOR)) \
1266  || (!defined(CONFIGURE_TASK_STACK_ALLOCATOR) \
1267  && defined(CONFIGURE_TASK_STACK_DEALLOCATOR))
1268  #error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined"
1269 #endif
1270  /* end of thread/interrupt stack configuration */
1271 
1281 #ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
1282  #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY
1283  #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \
1284  BSP_ZERO_WORKSPACE_AUTOMATICALLY
1285  #else
1286  #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE
1287  #endif
1288 #endif
1289  /* end of add to group Configuration */
1290 
1298 #include <rtems/malloc.h>
1299 
1300 #ifdef CONFIGURE_INIT
1301 
1307  #ifdef CONFIGURE_UNIFIED_WORK_AREAS
1309  #else
1310  Heap_Control RTEMS_Malloc_Area;
1311  Heap_Control *RTEMS_Malloc_Heap = &RTEMS_Malloc_Area;
1312  #endif
1313 #endif
1314 
1315 #ifdef CONFIGURE_INIT
1316 
1322  const rtems_heap_extend_handler rtems_malloc_extend_handler =
1323  #ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
1325  #else
1326  rtems_heap_null_extend;
1327  #endif
1328 #endif
1329 
1330 #ifdef CONFIGURE_INIT
1331 
1336  rtems_malloc_dirtier_t rtems_malloc_dirty_helper =
1337  #if defined(CONFIGURE_MALLOC_DIRTY)
1339  #else
1340  NULL;
1341  #endif
1342 #endif
1343  /* end of Malloc Configuration */
1344 
1358 #define _Configure_Zero_or_One(_number) ((_number) ? 1 : 0)
1359 
1363 #define _Configure_Align_up(_val, _align) \
1364  (((_val) + (_align) - 1) & ~((_align) - 1))
1365 
1372 #define _Configure_From_workspace(_size) \
1373  (ssize_t) (_Configure_Zero_or_One(_size) * \
1374  _Configure_Align_up((_size) + HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT))
1375 
1381 #ifdef CONFIGURE_TASK_STACK_FROM_ALLOCATOR
1382  #define _Configure_From_stackspace(_stack_size) \
1383  CONFIGURE_TASK_STACK_FROM_ALLOCATOR(_stack_size)
1384 #else
1385  #define _Configure_From_stackspace(_stack_size) \
1386  _Configure_From_workspace(_stack_size)
1387 #endif
1388 
1393 #define _Configure_Max_Objects(_max) \
1394  (_Configure_Zero_or_One(_max) * rtems_resource_maximum_per_allocation(_max))
1395 
1403 #define _Configure_Object_RAM(_number, _size) ( \
1404  _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
1405  _Configure_From_workspace( \
1406  _Configure_Zero_or_One(_number) * ( \
1407  (_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *) + \
1408  _Configure_Align_up(sizeof(void *), CPU_ALIGNMENT) + \
1409  _Configure_Align_up(sizeof(uint32_t), CPU_ALIGNMENT) \
1410  ) \
1411  ) \
1412  )
1413 
1426 #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
1427 
1428 #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
1429 
1430 /*
1431  * The user is defining their own table information and setting the
1432  * appropriate variables.
1433  */
1434 
1435 #else
1436 
1441 #ifndef CONFIGURE_INIT_TASK_NAME
1442  #define CONFIGURE_INIT_TASK_NAME rtems_build_name('U', 'I', '1', ' ')
1443 #endif
1444 
1449 #ifndef CONFIGURE_INIT_TASK_STACK_SIZE
1450  #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
1451 #endif
1452 
1457 #ifndef CONFIGURE_INIT_TASK_PRIORITY
1458  #define CONFIGURE_INIT_TASK_PRIORITY 1
1459 #endif
1460 
1465 #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
1466  #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
1467 #endif
1468 
1473 #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
1474  #ifdef __cplusplus
1475  extern "C" {
1476  #endif
1478  #ifdef __cplusplus
1479  }
1480  #endif
1481  #define CONFIGURE_INIT_TASK_ENTRY_POINT Init
1482  extern const char* bsp_boot_cmdline;
1483  #define CONFIGURE_INIT_TASK_ARGUMENTS ((rtems_task_argument) &bsp_boot_cmdline)
1484 #endif
1485 
1490 #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
1491  #if defined(RTEMS_SMP) && defined(CONFIGURE_SMP_APPLICATION)
1492  #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
1493  #else
1494  #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
1495  #endif
1496 #endif
1497 
1502 #ifndef CONFIGURE_INIT_TASK_ARGUMENTS
1503  #define CONFIGURE_INIT_TASK_ARGUMENTS 0
1504 #endif
1505 
1506 #ifdef CONFIGURE_INIT
1507  rtems_initialization_tasks_table Initialization_tasks[] = {
1508  { CONFIGURE_INIT_TASK_NAME,
1510  CONFIGURE_INIT_TASK_PRIORITY,
1511  CONFIGURE_INIT_TASK_ATTRIBUTES,
1512  CONFIGURE_INIT_TASK_ENTRY_POINT,
1513  CONFIGURE_INIT_TASK_INITIAL_MODES,
1514  CONFIGURE_INIT_TASK_ARGUMENTS
1515  }
1516  };
1517 #endif
1518 
1524 #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
1525 
1531 #define CONFIGURE_INIT_TASK_TABLE_SIZE \
1532  RTEMS_ARRAY_SIZE(CONFIGURE_INIT_TASK_TABLE)
1533 
1534 #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
1535 
1536 #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
1537 
1543 #define CONFIGURE_INIT_TASK_TABLE NULL
1544 
1550 #define CONFIGURE_INIT_TASK_TABLE_SIZE 0
1551 
1557 #define CONFIGURE_INIT_TASK_STACK_SIZE 0
1558 
1559 #endif
1560  /* end of Classic API Initialization Tasks Table */
1561 
1578 #define NULL_DRIVER_TABLE_ENTRY \
1579  { NULL, NULL, NULL, NULL, NULL, NULL }
1580 
1581 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
1582  #include <rtems/console.h>
1583 #endif
1584 
1585 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
1586  #include <rtems/clockdrv.h>
1587 #endif
1588 
1589 #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
1590  #include <rtems/btimer.h>
1591 #endif
1592 
1593 #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
1594  #include <rtems/rtc.h>
1595 #endif
1596 
1597 #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
1598  #include <rtems/watchdogdrv.h>
1599 #endif
1600 
1601 #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
1602  #include <rtems/framebuffer.h>
1603 #endif
1604 
1605 #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
1606  #include <rtems/devnull.h>
1607 #endif
1608 
1609 #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
1610  #include <rtems/devzero.h>
1611 #endif
1612 
1613 #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
1614  /* the ide driver needs the ATA driver */
1615  #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
1616  #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
1617  #endif
1618  #include <libchip/ide_ctrl.h>
1619 #endif
1620 
1621 #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
1622  #include <libchip/ata.h>
1623 #endif
1624 
1625 #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
1626 
1632 #ifndef CONFIGURE_MAXIMUM_DRIVERS
1633  #define CONFIGURE_MAXIMUM_DRIVERS
1634 #endif
1635 
1636 #ifdef CONFIGURE_INIT
1638  _IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = {
1639  #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS
1640  CONFIGURE_BSP_PREREQUISITE_DRIVERS,
1641  #endif
1642  #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
1643  CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS,
1644  #endif
1645  #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
1647  #endif
1648  #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
1649  CLOCK_DRIVER_TABLE_ENTRY,
1650  #endif
1651  #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
1653  #endif
1654  #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
1656  #endif
1657  #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
1658  DEVNULL_DRIVER_TABLE_ENTRY,
1659  #endif
1660  #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
1661  DEVZERO_DRIVER_TABLE_ENTRY,
1662  #endif
1663  #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
1664  IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
1665  #endif
1666  #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
1667  ATA_DRIVER_TABLE_ENTRY,
1668  #endif
1669  #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
1671  #endif
1672  #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
1673  CONFIGURE_APPLICATION_EXTRA_DRIVERS,
1674  #endif
1675  #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
1677  #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
1678  !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
1679  !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
1680  !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \
1681  !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) && \
1682  !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \
1683  !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \
1684  !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \
1685  !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS)
1687  #endif
1688  };
1689 
1690  const size_t _IO_Number_of_drivers =
1691  RTEMS_ARRAY_SIZE( _IO_Driver_address_table );
1692 #endif
1693 
1694 #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
1695 
1696 #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
1697  /*
1698  * configure the priority of the ATA driver task
1699  */
1700  #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY
1701  #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY
1702  #endif
1703  #ifdef CONFIGURE_INIT
1704  rtems_task_priority rtems_ata_driver_task_priority
1705  = CONFIGURE_ATA_DRIVER_TASK_PRIORITY;
1706  #endif /* CONFIGURE_INIT */
1707 #endif
1708  /* end of Device Driver Table Configuration */
1709 
1720 #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
1721  #include <rtems/bdbuf.h>
1722  /*
1723  * configure the bdbuf cache parameters
1724  */
1725  #ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
1726  #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \
1727  RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT
1728  #endif
1729  #ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
1730  #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \
1731  RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT
1732  #endif
1733  #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY
1734  #define CONFIGURE_SWAPOUT_TASK_PRIORITY \
1735  RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
1736  #endif
1737  #ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD
1738  #define CONFIGURE_SWAPOUT_SWAP_PERIOD \
1739  RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT
1740  #endif
1741  #ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD
1742  #define CONFIGURE_SWAPOUT_BLOCK_HOLD \
1743  RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT
1744  #endif
1745  #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS
1746  #define CONFIGURE_SWAPOUT_WORKER_TASKS \
1747  RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT
1748  #endif
1749  #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
1750  #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \
1751  RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT
1752  #endif
1753  #ifndef CONFIGURE_BDBUF_TASK_STACK_SIZE
1754  #define CONFIGURE_BDBUF_TASK_STACK_SIZE \
1755  RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT
1756  #endif
1757  #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
1758  #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \
1759  RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT
1760  #endif
1761  #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE
1762  #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \
1763  RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT
1764  #endif
1765  #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE
1766  #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \
1767  RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT
1768  #endif
1769  #ifndef CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
1770  #define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY \
1771  RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT
1772  #endif
1773  #ifdef CONFIGURE_INIT
1775  CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS,
1776  CONFIGURE_BDBUF_MAX_WRITE_BLOCKS,
1777  CONFIGURE_SWAPOUT_TASK_PRIORITY,
1778  CONFIGURE_SWAPOUT_SWAP_PERIOD,
1779  CONFIGURE_SWAPOUT_BLOCK_HOLD,
1780  CONFIGURE_SWAPOUT_WORKER_TASKS,
1781  CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY,
1782  CONFIGURE_BDBUF_TASK_STACK_SIZE,
1783  CONFIGURE_BDBUF_CACHE_MEMORY_SIZE,
1784  CONFIGURE_BDBUF_BUFFER_MIN_SIZE,
1785  CONFIGURE_BDBUF_BUFFER_MAX_SIZE,
1786  CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
1787  };
1788  #endif
1789 
1790  #define CONFIGURE_LIBBLOCK_TASKS \
1791  (1 + CONFIGURE_SWAPOUT_WORKER_TASKS + \
1792  (CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS != 0))
1793 
1794  #define CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS \
1795  (CONFIGURE_LIBBLOCK_TASKS * \
1796  (CONFIGURE_BDBUF_TASK_STACK_SIZE <= CONFIGURE_MINIMUM_TASK_STACK_SIZE ? \
1797  0 : CONFIGURE_BDBUF_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE))
1798 
1799  #ifdef RTEMS_BDBUF_USE_PTHREAD
1800  /*
1801  * Semaphores:
1802  * o disk lock
1803  */
1804  #define CONFIGURE_LIBBLOCK_SEMAPHORES 1
1805 
1806  /*
1807  * POSIX Mutexes:
1808  * o bdbuf lock
1809  * o bdbuf sync lock
1810  */
1811  #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 2
1812 
1813  /*
1814  * POSIX Condition Variables:
1815  * o bdbuf access condition
1816  * o bdbuf transfer condition
1817  * o bdbuf buffer condition
1818  */
1819  #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 3
1820  #else
1821  /*
1822  * Semaphores:
1823  * o disk lock
1824  * o bdbuf lock
1825  * o bdbuf sync lock
1826  * o bdbuf access condition
1827  * o bdbuf transfer condition
1828  * o bdbuf buffer condition
1829  */
1830  #define CONFIGURE_LIBBLOCK_SEMAPHORES 6
1831 
1832  #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
1833  #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
1834  #endif
1835 
1836  #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
1837  defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \
1838  defined(CONFIGURE_BDBUF_BUFFER_COUNT)
1839  #error BDBUF Cache does not use a buffer configuration table. Please remove.
1840  #endif
1841 #else
1842 
1843  #define CONFIGURE_LIBBLOCK_TASKS 0
1844 
1845  #define CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS 0
1846 
1847  #define CONFIGURE_LIBBLOCK_SEMAPHORES 0
1848 
1849  #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
1850 
1854  #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
1855 #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
1856 
1875 #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
1876  #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
1877 #endif
1878 
1883 #ifndef CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER
1884  #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 0
1885 #endif
1886 
1887 
1888 #if defined(RTEMS_MULTIPROCESSING)
1889  /*
1890  * Default Multiprocessing Configuration Table. The defaults are
1891  * appropriate for most of the RTEMS Multiprocessor Test Suite. Each
1892  * value may be overridden within each test to customize the environment.
1893  */
1894 
1895  #ifdef CONFIGURE_MP_APPLICATION
1896  #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 1
1897 
1898  #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
1899 
1900  #ifndef CONFIGURE_MP_NODE_NUMBER
1901  #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER
1902  #endif
1903 
1904  #ifndef CONFIGURE_MP_MAXIMUM_NODES
1905  #define CONFIGURE_MP_MAXIMUM_NODES 2
1906  #endif
1907 
1908  #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
1909  #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32
1910  #endif
1911  #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
1912  _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control))
1913 
1914  #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
1915  #define CONFIGURE_MP_MAXIMUM_PROXIES 32
1916  #endif
1917  #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
1918  _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
1919 
1920  #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
1921  #include <mpci.h>
1922  #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table
1923  #endif
1924 
1925  #ifdef CONFIGURE_INIT
1926  rtems_multiprocessing_table Multiprocessing_configuration = {
1927  CONFIGURE_MP_NODE_NUMBER, /* local node number */
1928  CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */
1929  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */
1930  CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */
1931  CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */
1932  CONFIGURE_MP_MPCI_TABLE_POINTER /* ptr to MPCI config table */
1933  };
1934  #endif
1935 
1936  #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration
1937 
1938  #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */
1939 
1940  #else
1941 
1942  #define CONFIGURE_MULTIPROCESSING_TABLE NULL
1943 
1944  #endif /* CONFIGURE_MP_APPLICATION */
1945 #endif /* RTEMS_MULTIPROCESSING */
1946  /* end of Multiprocessing Configuration */
1947 
1952 #if defined(CONFIGURE_UNLIMITED_OBJECTS)
1953  #if !defined(CONFIGURE_UNIFIED_WORK_AREAS) && \
1954  !defined(CONFIGURE_EXECUTIVE_RAM_SIZE) && \
1955  !defined(CONFIGURE_MEMORY_OVERHEAD)
1956  #error "CONFIGURE_UNLIMITED_OBJECTS requires a unified work area, an executive RAM size, or a defined workspace memory overhead"
1957  #endif
1958 
1959  #if !defined(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1960 
1964  #define CONFIGURE_UNLIMITED_ALLOCATION_SIZE 8
1965  #endif
1966  #if !defined(CONFIGURE_MAXIMUM_TASKS)
1967  #define CONFIGURE_MAXIMUM_TASKS \
1968  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1969  #endif
1970  #if !defined(CONFIGURE_MAXIMUM_TIMERS)
1971  #define CONFIGURE_MAXIMUM_TIMERS \
1972  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1973  #endif
1974  #if !defined(CONFIGURE_MAXIMUM_SEMAPHORES)
1975  #define CONFIGURE_MAXIMUM_SEMAPHORES \
1976  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1977  #endif
1978  #if !defined(CONFIGURE_MAXIMUM_MESSAGE_QUEUES)
1979  #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES \
1980  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1981  #endif
1982  #if !defined(CONFIGURE_MAXIMUM_PARTITIONS)
1983  #define CONFIGURE_MAXIMUM_PARTITIONS \
1984  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1985  #endif
1986  #if !defined(CONFIGURE_MAXIMUM_REGIONS)
1987  #define CONFIGURE_MAXIMUM_REGIONS \
1988  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1989  #endif
1990  #if !defined(CONFIGURE_MAXIMUM_PORTS)
1991  #define CONFIGURE_MAXIMUM_PORTS \
1992  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1993  #endif
1994  #if !defined(CONFIGURE_MAXIMUM_PERIODS)
1995  #define CONFIGURE_MAXIMUM_PERIODS \
1996  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
1997  #endif
1998  #if !defined(CONFIGURE_MAXIMUM_BARRIERS)
1999  #define CONFIGURE_MAXIMUM_BARRIERS \
2000  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2001  #endif
2002  #if !defined(CONFIGURE_MAXIMUM_POSIX_KEYS)
2003  #define CONFIGURE_MAXIMUM_POSIX_KEYS \
2004  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2005  #endif
2006  #if !defined(CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS)
2007  #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \
2008  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2009  #endif
2010 
2011  #ifdef RTEMS_POSIX_API
2012  #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS)
2013  #define CONFIGURE_MAXIMUM_POSIX_THREADS \
2014  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2015  #endif
2016  #if !defined(CONFIGURE_MAXIMUM_POSIX_MUTEXES)
2017  #define CONFIGURE_MAXIMUM_POSIX_MUTEXES \
2018  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2019  #endif
2020  #if !defined(CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES)
2021  #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES \
2022  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2023  #endif
2024  #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS)
2025  #define CONFIGURE_MAXIMUM_POSIX_TIMERS \
2026  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2027  #endif
2028 /*
2029  #if !defined(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS)
2030  #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS \
2031  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2032  #endif
2033 */
2034  #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
2035  #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \
2036  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2037  #endif
2038  #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS)
2039  #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \
2040  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2041  #endif
2042  #if !defined(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES)
2043  #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES \
2044  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2045  #endif
2046  #if !defined(CONFIGURE_MAXIMUM_POSIX_BARRIERS)
2047  #define CONFIGURE_MAXIMUM_POSIX_BARRIERS \
2048  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2049  #endif
2050  #if !defined(CONFIGURE_MAXIMUM_POSIX_RWLOCKS)
2051  #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS \
2052  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2053  #endif
2054  #if !defined(CONFIGURE_MAXIMUM_POSIX_SPINLOCKS)
2055  #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS \
2056  rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
2057  #endif
2058  #endif /* RTEMS_POSIX_API */
2059 #endif /* CONFIGURE_UNLIMITED_OBJECTS */
2060 
2061 
2071 #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
2072 
2074  #ifndef CONFIGURE_MAXIMUM_TASKS
2075  #define CONFIGURE_MAXIMUM_TASKS 0
2076  #endif
2077 
2084  #define CONFIGURE_TASKS \
2085  (CONFIGURE_MAXIMUM_TASKS + CONFIGURE_LIBBLOCK_TASKS)
2086 
2087  /*
2088  * Classic API notepads are a deprecated feature and will be removed
2089  * in a future release of RTEMS. Warn the user who uses them.
2090  */
2091  #if defined(CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS)
2092  #warning "Classic API Notepads are deprecated and will be removed."
2093  #endif
2094  #if defined(CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS)
2095  #warning "Classic API Notepads are deprecated and will be removed."
2096  #endif
2097 
2099  #ifdef CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
2100  #define CONFIGURE_NOTEPADS_ENABLED TRUE
2101  #else
2102  #define CONFIGURE_NOTEPADS_ENABLED FALSE
2103  #endif
2104 
2115  #if defined(RTEMS_SMP)
2116  #ifdef CONFIGURE_MAXIMUM_TASK_VARIABLES
2117  #warning "Per-Task Variables are deprecated and will be removed."
2118  #error "Per-Task Variables are not safe for SMP systems and disabled."
2119  #endif
2120  #define CONFIGURE_MAXIMUM_TASK_VARIABLES 0
2121  #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0
2122  #else
2123  #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES
2124 
2125  #define CONFIGURE_MAXIMUM_TASK_VARIABLES 0
2126 
2132  #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0
2133  #else
2134  #warning "Per-Task Variables are deprecated and will be removed."
2135  #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \
2136  (_task_variables) * \
2137  _Configure_From_workspace(sizeof(rtems_task_variable_t))
2138  #endif
2139  #endif
2140 
2141  #ifndef CONFIGURE_MAXIMUM_TIMERS
2142 
2143  #define CONFIGURE_MAXIMUM_TIMERS 0
2144 
2150  #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0
2151  #else
2152  #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
2153  _Configure_Object_RAM(_timers, sizeof(Timer_Control) )
2154  #endif
2155 
2156  #ifndef CONFIGURE_MAXIMUM_SEMAPHORES
2157 
2158  #define CONFIGURE_MAXIMUM_SEMAPHORES 0
2159  #endif
2160 
2166  #ifdef RTEMS_NETWORKING
2167  #define CONFIGURE_NETWORKING_SEMAPHORES 1
2168  #else
2169  #define CONFIGURE_NETWORKING_SEMAPHORES 0
2170  #endif
2171 
2179  #define CONFIGURE_SEMAPHORES \
2180  (CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
2181  CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
2182  CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS + \
2183  CONFIGURE_NETWORKING_SEMAPHORES + CONFIGURE_DRVMGR_SEMAPHORES)
2184 
2192  #if !defined(RTEMS_SMP) || \
2193  !defined(CONFIGURE_MAXIMUM_MRSP_SEMAPHORES)
2194  #define CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES 0
2195  #else
2196  #define CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES \
2197  CONFIGURE_MAXIMUM_MRSP_SEMAPHORES * \
2198  _Configure_From_workspace( \
2199  RTEMS_ARRAY_SIZE(_Scheduler_Table) * sizeof(Priority_Control) \
2200  )
2201  #endif
2202 
2212  #if CONFIGURE_SEMAPHORES == 0
2213  #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
2214  #else
2215  #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
2216  _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) ) + \
2217  CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES
2218  #endif
2219 
2220  #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
2221 
2225  #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0
2226 
2232  #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0
2233  #else
2234  #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
2235  _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) )
2236  #endif
2237 
2238  #ifndef CONFIGURE_MAXIMUM_PARTITIONS
2239 
2243  #define CONFIGURE_MAXIMUM_PARTITIONS 0
2244 
2250  #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0
2251  #else
2252  #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
2253  _Configure_Object_RAM(_partitions, sizeof(Partition_Control) )
2254  #endif
2255 
2256  #ifndef CONFIGURE_MAXIMUM_REGIONS
2257 
2261  #define CONFIGURE_MAXIMUM_REGIONS 0
2262 
2268  #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0
2269  #else
2270  #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
2271  _Configure_Object_RAM(_regions, sizeof(Region_Control) )
2272  #endif
2273 
2274  #ifndef CONFIGURE_MAXIMUM_PORTS
2275 
2279  #define CONFIGURE_MAXIMUM_PORTS 0
2280 
2286  #define CONFIGURE_MEMORY_FOR_PORTS(_ports) 0
2287  #else
2288  #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
2289  _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) )
2290  #endif
2291 
2292  #ifndef CONFIGURE_MAXIMUM_PERIODS
2293 
2297  #define CONFIGURE_MAXIMUM_PERIODS 0
2298 
2304  #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0
2305 #else
2306  #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
2307  _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) )
2308  #endif
2309 
2314  #ifndef CONFIGURE_MAXIMUM_BARRIERS
2315  #define CONFIGURE_MAXIMUM_BARRIERS 0
2316  #endif
2317 
2324  #define CONFIGURE_BARRIERS \
2325  (CONFIGURE_MAXIMUM_BARRIERS + CONFIGURE_BARRIERS_FOR_FIFOS)
2326 
2333  #if CONFIGURE_BARRIERS == 0
2334  #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
2335  #else
2336  #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
2337  _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) )
2338  #endif
2339 
2340  #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
2341 
2345  #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
2346 
2352  #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0
2353  #else
2354  #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
2355  _Configure_Object_RAM(_extensions, sizeof(Extension_Control) )
2356  #endif
2357  /* end of Classic API Configuration */
2358 
2370  #ifndef CONFIGURE_MICROSECONDS_PER_TICK
2371  #define CONFIGURE_MICROSECONDS_PER_TICK \
2372  RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
2373  #endif
2374 
2376  #ifndef CONFIGURE_TICKS_PER_TIMESLICE
2377  #define CONFIGURE_TICKS_PER_TIMESLICE 50
2378  #endif
2379  /* end of General Configuration */
2381 
2382 /*
2383  * Initial Extension Set
2384  */
2385 
2386 #ifdef CONFIGURE_INIT
2387 #ifdef CONFIGURE_STACK_CHECKER_ENABLED
2388 #include <rtems/stackchk.h>
2389 #endif
2390 #include <rtems/libcsupport.h>
2391 
2392 #if defined(BSP_INITIAL_EXTENSION) || \
2393  defined(CONFIGURE_INITIAL_EXTENSIONS) || \
2394  defined(CONFIGURE_STACK_CHECKER_ENABLED) || \
2395  (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
2396  static const rtems_extensions_table Configuration_Initial_Extensions[] = {
2397  #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)
2398  RTEMS_NEWLIB_EXTENSION,
2399  #endif
2400  #if defined(CONFIGURE_STACK_CHECKER_ENABLED)
2402  #endif
2403  #if defined(CONFIGURE_INITIAL_EXTENSIONS)
2404  CONFIGURE_INITIAL_EXTENSIONS,
2405  #endif
2406  #if defined(BSP_INITIAL_EXTENSION)
2407  BSP_INITIAL_EXTENSION
2408  #endif
2409  };
2410 
2411  #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
2412  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
2413  RTEMS_ARRAY_SIZE(Configuration_Initial_Extensions)
2414 #else
2415  #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
2416  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
2417 #endif
2418 
2419 #if defined(RTEMS_NEWLIB) && defined(__DYNAMIC_REENT__)
2420  struct _reent *__getreent(void)
2421  {
2422  #ifdef CONFIGURE_DISABLE_NEWLIB_REENTRANCY
2423  return _GLOBAL_REENT;
2424  #else
2426  #endif
2427  }
2428 #endif
2429 
2430 #endif
2431 
2440 #include <rtems/posix/key.h>
2441 
2448 #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
2449  #define CONFIGURE_MAXIMUM_POSIX_KEYS 0
2450 #endif
2451 
2458 #ifndef CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS
2459  #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \
2460  (CONFIGURE_MAXIMUM_POSIX_KEYS * \
2461  (CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_TASKS))
2462 #endif
2463 
2471 #define CONFIGURE_POSIX_KEYS \
2472  (CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_LIBIO_POSIX_KEYS)
2473 
2480 #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys, _key_value_pairs) \
2481  (_Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) \
2482  + _Configure_From_workspace( \
2483  _Configure_Max_Objects(_key_value_pairs) \
2484  * sizeof(POSIX_Keys_Key_value_pair)))
2485 
2486 /*
2487  * The rest of the POSIX threads API features are only available when
2488  * POSIX is enabled.
2489  */
2490 #ifdef RTEMS_POSIX_API
2491  #include <sys/types.h>
2492  #include <signal.h>
2493  #include <limits.h>
2494  #include <mqueue.h>
2495  #include <rtems/posix/barrier.h>
2496  #include <rtems/posix/cond.h>
2497  #include <rtems/posix/mqueue.h>
2498  #include <rtems/posix/mutex.h>
2499  #include <rtems/posix/psignal.h>
2500  #include <rtems/posix/pthread.h>
2501  #include <rtems/posix/rwlock.h>
2502  #include <rtems/posix/semaphore.h>
2503  #include <rtems/posix/spinlock.h>
2504  #include <rtems/posix/threadsup.h>
2505  #include <rtems/posix/timer.h>
2506 
2513  #define _Configure_POSIX_Named_Object_RAM(_number, _size) \
2514  _Configure_Object_RAM( (_number), _size ) + \
2515  (_Configure_Max_Objects(_number) * _Configure_From_workspace(NAME_MAX) )
2516 
2521  #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
2522  #define CONFIGURE_MAXIMUM_POSIX_THREADS 0
2523  #endif
2524 
2529  #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
2530  #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0
2531  #endif
2532 
2539  #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
2540  _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
2541 
2546  #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
2547  #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0
2548  #endif
2549 
2556  #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
2557  _Configure_Object_RAM(_condvars, \
2558  sizeof(POSIX_Condition_variables_Control) )
2559 
2564  #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
2565  #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
2566  #endif
2567 
2574  #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
2575  _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
2576 
2581  #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
2582  #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
2583  #endif
2584 
2591  #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
2592  _Configure_From_workspace( \
2593  (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
2594 
2599  #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
2600  #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
2601  #endif
2602 
2609  #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS
2610  #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \
2611  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
2612  #endif
2613 
2620  #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
2621  _Configure_POSIX_Named_Object_RAM( \
2622  _message_queues, sizeof(POSIX_Message_queue_Control) )
2623 
2630  #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_mqueue_fds) \
2631  _Configure_Object_RAM( \
2632  _mqueue_fds, sizeof(POSIX_Message_queue_Control_fd) )
2633 
2638  #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
2639  #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
2640  #endif
2641 
2648  #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
2649  _Configure_POSIX_Named_Object_RAM( \
2650  _semaphores, sizeof(POSIX_Semaphore_Control) )
2651 
2656  #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS
2657  #define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0
2658  #endif
2659 
2666  #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \
2667  _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
2668 
2673  #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
2674  #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0
2675  #endif
2676 
2683  #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
2684  _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
2685 
2690  #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS
2691  #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0
2692  #endif
2693 
2700  #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
2701  _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
2702 
2703  #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
2704 
2705  #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
2706 
2707  /*
2708  * The user is defining their own table information and setting the
2709  * appropriate variables for the POSIX Initialization Thread Table.
2710  */
2711 
2712  #else
2713 
2714  #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
2715  #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init
2716  #endif
2717 
2718  #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
2719  #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
2720  CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
2721  #endif
2722 
2723  #ifdef CONFIGURE_INIT
2724  posix_initialization_threads_table POSIX_Initialization_threads[] = {
2725  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
2726  CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
2727  };
2728  #endif
2729 
2730  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \
2731  POSIX_Initialization_threads
2732 
2733  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
2734  RTEMS_ARRAY_SIZE(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME)
2735 
2736  #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
2737 
2738  #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
2739 
2740  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
2741  #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
2742 
2743  #endif
2744 
2745 #else
2746 
2751  #define CONFIGURE_MAXIMUM_POSIX_THREADS 0
2752 
2753 #endif /* RTEMS_POSIX_API */
2754 
2759 #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
2760  #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0
2761 #endif
2762  /* end of POSIX API Configuration */
2763 
2773 #ifdef CONFIGURE_GNAT_RTEMS
2774 
2779  #define CONFIGURE_GNAT_MUTEXES 10
2780 
2786  #ifndef CONFIGURE_MAXIMUM_ADA_TASKS
2787  #define CONFIGURE_MAXIMUM_ADA_TASKS 20
2788  #endif
2789 
2793  #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
2794  #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
2795  #endif
2796 
2797 #else
2798 
2799  #define CONFIGURE_GNAT_MUTEXES 0
2800 
2801  #define CONFIGURE_MAXIMUM_ADA_TASKS 0
2802 
2806  #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
2807 #endif
2808  /* end of GNAT Configuration */
2809 
2819 #ifdef CONFIGURE_ENABLE_GO
2820 
2821  #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
2822  #define CONFIGURE_MAXIMUM_POSIX_THREADS 1
2823  #endif
2824  #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
2825  #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
2826  #endif
2827  #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
2828  #define CONFIGURE_MAXIMUM_CONDITION_VARIABLES 1
2829  #endif
2830 
2831  #define CONFIGURE_GO_INIT_MUTEXES 77
2832  #define CONFIGURE_GO_INIT_CONDITION_VARIABLES 4
2833 
2834  #ifndef CONFIGURE_MAXIMUM_GOROUTINES
2835  #define CONFIGURE_MAXIMUM_GOROUTINES 400
2836  #endif
2837 
2838  #define CONFIGURE_GOROUTINES_TASK_VARIABLES \
2839  (2 * CONFIGURE_MAXIMUM_GOROUTINES)
2840 
2841  #ifndef CONFIGURE_MAXIMUM_GO_CHANNELS
2842  #define CONFIGURE_MAXIMUM_GO_CHANNELS 500
2843  #endif
2844 
2845 #else
2846 
2852  #define CONFIGURE_GO_INIT_MUTEXES 0
2853 
2860  #define CONFIGURE_GO_INIT_CONDITION_VARIABLES 0
2861 
2863  #define CONFIGURE_MAXIMUM_GOROUTINES 0
2864 
2866  #define CONFIGURE_GOROUTINES_TASK_VARIABLES 0
2867 
2869  #define CONFIGURE_MAXIMUM_GO_CHANNELS 0
2870 #endif
2871  /* end of Go Configuration */
2872 
2877 #ifndef CONFIGURE_EXTRA_TASK_STACKS
2878  #define CONFIGURE_EXTRA_TASK_STACKS 0
2879 #endif
2880 
2884 #define CONFIGURE_POSIX_THREADS \
2885  (CONFIGURE_MAXIMUM_POSIX_THREADS + \
2886  CONFIGURE_MAXIMUM_ADA_TASKS + \
2887  CONFIGURE_MAXIMUM_GOROUTINES)
2888 
2889 #ifdef RTEMS_POSIX_API
2890 
2893  #define CONFIGURE_POSIX_MUTEXES \
2894  (CONFIGURE_MAXIMUM_POSIX_MUTEXES + \
2895  CONFIGURE_LIBBLOCK_POSIX_MUTEXES + \
2896  CONFIGURE_GNAT_MUTEXES + \
2897  CONFIGURE_MAXIMUM_ADA_TASKS + \
2898  CONFIGURE_MAXIMUM_FAKE_ADA_TASKS + \
2899  CONFIGURE_GO_INIT_MUTEXES + \
2900  CONFIGURE_MAXIMUM_GO_CHANNELS)
2901 
2907  #define CONFIGURE_POSIX_CONDITION_VARIABLES \
2908  (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
2909  CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES + \
2910  CONFIGURE_MAXIMUM_ADA_TASKS + \
2911  CONFIGURE_MAXIMUM_FAKE_ADA_TASKS + \
2912  CONFIGURE_GO_INIT_CONDITION_VARIABLES + \
2913  CONFIGURE_MAXIMUM_GO_CHANNELS)
2914 
2921  #define CONFIGURE_MEMORY_FOR_POSIX \
2922  (CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(CONFIGURE_POSIX_MUTEXES) + \
2923  CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
2924  CONFIGURE_POSIX_CONDITION_VARIABLES) + \
2925  CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
2926  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) + \
2927  CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
2928  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \
2929  CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS( \
2930  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS) + \
2931  CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
2932  CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) + \
2933  CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \
2934  CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \
2935  CONFIGURE_MAXIMUM_POSIX_SPINLOCKS) + \
2936  CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
2937  CONFIGURE_MAXIMUM_POSIX_RWLOCKS) + \
2938  CONFIGURE_MEMORY_FOR_POSIX_TIMERS(CONFIGURE_MAXIMUM_POSIX_TIMERS))
2939 #else
2940 
2946  #define CONFIGURE_MEMORY_FOR_POSIX 0
2947 #endif
2948 
2949 /*
2950  * We must be able to split the free block used for the second last allocation
2951  * into two parts so that we have a free block for the last allocation. See
2952  * _Heap_Block_split().
2953  */
2954 #define CONFIGURE_HEAP_HANDLER_OVERHEAD \
2955  _Configure_Align_up( HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT )
2956 
2957 /*
2958  * Calculate the RAM size based on the maximum number of objects configured.
2959  */
2960 #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
2961 
2970 #define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \
2971  ( \
2972  _Configure_Object_RAM(_tasks, sizeof(Configuration_Thread_control)) \
2973  + _Configure_Max_Objects(_number_FP_tasks) \
2974  * _Configure_From_workspace(CONTEXT_FP_SIZE) \
2975  )
2976 
2983 #ifdef CONFIGURE_MP_APPLICATION
2984  #define CONFIGURE_MEMORY_FOR_MP \
2985  (CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
2986  CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \
2987  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
2988  CONFIGURE_MEMORY_FOR_TASKS(1, 1) \
2989  )
2990 #else
2991  #define CONFIGURE_MEMORY_FOR_MP 0
2992 #endif
2993 
2999 #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \
3000  _Configure_From_workspace( \
3001  (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control)))
3002 
3010 #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY
3011  #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0
3012 #endif
3013 
3026 #ifndef CONFIGURE_MEMORY_OVERHEAD
3027  #define CONFIGURE_MEMORY_OVERHEAD 0
3028 #endif
3029 
3034 #define CONFIGURE_API_MUTEX_MEMORY \
3035  _Configure_Object_RAM(2, sizeof(API_Mutex_Control))
3036 
3041 #if defined(RTEMS_SMP)
3042  #define CONFIGURE_IDLE_TASKS_COUNT CONFIGURE_SMP_MAXIMUM_PROCESSORS
3043 #else
3044  #define CONFIGURE_IDLE_TASKS_COUNT 1
3045 #endif
3046 
3051 #if CPU_IDLE_TASK_IS_FP == TRUE
3052  #define CONFIGURE_MEMORY_FOR_IDLE_TASK \
3053  CONFIGURE_MEMORY_FOR_TASKS( \
3054  CONFIGURE_IDLE_TASKS_COUNT, CONFIGURE_IDLE_TASKS_COUNT)
3055 #else
3056  #define CONFIGURE_MEMORY_FOR_IDLE_TASK \
3057  CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_IDLE_TASKS_COUNT, 0)
3058 #endif
3059 
3063 #define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
3064  ( CONFIGURE_MEMORY_FOR_IDLE_TASK + /* IDLE and stack */ \
3065  CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
3066  CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \
3067  )
3068 
3073 #define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \
3074  (CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS == 0 ? 0 : \
3075  _Configure_From_workspace( \
3076  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
3077  * sizeof(User_extensions_Switch_control) \
3078  ))
3079 
3084 #define CONFIGURE_MEMORY_FOR_CLASSIC \
3085  (CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES + \
3086  CONFIGURE_GOROUTINES_TASK_VARIABLES) + \
3087  CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \
3088  CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \
3089  CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES) + \
3090  CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
3091  CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
3092  CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
3093  CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
3094  CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
3095  CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS) + \
3096  CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
3097  )
3098 
3104 #if defined(RTEMS_SMP)
3105  #define CONFIGURE_MEMORY_FOR_SMP \
3106  (CONFIGURE_SMP_MAXIMUM_PROCESSORS * \
3107  _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE ) \
3108  )
3109 #else
3110  #define CONFIGURE_MEMORY_FOR_SMP 0
3111 #endif
3112 
3118 #define CONFIGURE_EXECUTIVE_RAM_SIZE \
3119 ( \
3120  CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
3121  CONFIGURE_MEMORY_FOR_TASKS( \
3122  CONFIGURE_TASKS, CONFIGURE_TASKS) + \
3123  CONFIGURE_MEMORY_FOR_TASKS( \
3124  CONFIGURE_POSIX_THREADS, CONFIGURE_POSIX_THREADS) + \
3125  CONFIGURE_MEMORY_FOR_CLASSIC + \
3126  CONFIGURE_MEMORY_FOR_POSIX_KEYS( \
3127  CONFIGURE_POSIX_KEYS, \
3128  CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ) + \
3129  CONFIGURE_MEMORY_FOR_POSIX + \
3130  CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
3131  CONFIGURE_MEMORY_FOR_MP + \
3132  CONFIGURE_MEMORY_FOR_SMP + \
3133  CONFIGURE_MESSAGE_BUFFER_MEMORY + \
3134  (CONFIGURE_MEMORY_OVERHEAD * 1024) + \
3135  CONFIGURE_HEAP_HANDLER_OVERHEAD \
3136 )
3137 
3138 /*
3139  * Now account for any extra memory that initialization tasks or threads
3140  * may have requested.
3141  */
3142 
3149 #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
3150  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \
3151  (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
3152 #else
3153  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0
3154 #endif
3155 
3162 #if defined(RTEMS_POSIX_API) && \
3163  (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \
3164  CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE)
3165  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
3166  (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - \
3167  CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE)
3168 #else
3169  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
3170 #endif
3171 
3178 #define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS \
3179  (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
3180  CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART)
3181 
3188 #define CONFIGURE_IDLE_TASKS_STACK \
3189  (CONFIGURE_IDLE_TASKS_COUNT * \
3190  _Configure_From_stackspace( CONFIGURE_IDLE_TASK_STACK_SIZE ) )
3191 
3198 #define CONFIGURE_TASKS_STACK \
3199  (_Configure_Max_Objects( CONFIGURE_TASKS ) * \
3200  _Configure_From_stackspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) )
3201 
3208 #define CONFIGURE_POSIX_THREADS_STACK \
3209  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_POSIX_THREADS ) * \
3210  _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
3211 
3218 #define CONFIGURE_ADA_TASKS_STACK \
3219  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_ADA_TASKS ) * \
3220  _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
3221 
3228 #define CONFIGURE_GOROUTINES_STACK \
3229  (_Configure_Max_Objects( CONFIGURE_MAXIMUM_GOROUTINES ) * \
3230  _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
3231 
3232 #else /* CONFIGURE_EXECUTIVE_RAM_SIZE */
3233 
3234 #define CONFIGURE_IDLE_TASKS_STACK 0
3235 #define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS 0
3236 #define CONFIGURE_TASKS_STACK 0
3237 #define CONFIGURE_POSIX_THREADS_STACK 0
3238 #define CONFIGURE_GOROUTINES_STACK 0
3239 #define CONFIGURE_ADA_TASKS_STACK 0
3240 
3241 #if CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK != 0
3242  #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK"
3243 #endif
3244 
3245 #if CONFIGURE_EXTRA_TASK_STACKS != 0
3246  #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_TASK_STACKS"
3247 #endif
3248 
3249 #endif /* CONFIGURE_EXECUTIVE_RAM_SIZE */
3250 
3257 #define CONFIGURE_STACK_SPACE_SIZE \
3258  ( \
3259  CONFIGURE_IDLE_TASKS_STACK + \
3260  CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \
3261  CONFIGURE_TASKS_STACK + \
3262  CONFIGURE_POSIX_THREADS_STACK + \
3263  CONFIGURE_GOROUTINES_STACK + \
3264  CONFIGURE_ADA_TASKS_STACK + \
3265  CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK + \
3266  CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS + \
3267  CONFIGURE_EXTRA_TASK_STACKS + \
3268  CONFIGURE_HEAP_HANDLER_OVERHEAD \
3269  )
3270 
3271 #ifdef CONFIGURE_INIT
3272  typedef struct {
3273  Thread_Control Control;
3274  #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0
3275  void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ];
3276  #endif
3277  union {
3278  Scheduler_Node Base;
3279  #ifdef CONFIGURE_SCHEDULER_CBS
3280  Scheduler_CBS_Node CBS;
3281  #endif
3282  #ifdef CONFIGURE_SCHEDULER_EDF
3283  Scheduler_EDF_Node EDF;
3284  #endif
3285  #ifdef CONFIGURE_SCHEDULER_PRIORITY
3286  Scheduler_priority_Node Priority;
3287  #endif
3288  #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP
3289  Scheduler_SMP_Node Simple_SMP;
3290  #endif
3291  #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP
3292  Scheduler_priority_SMP_Node Priority_SMP;
3293  #endif
3294  #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
3295  Scheduler_priority_affinity_SMP_Node Priority_affinity_SMP;
3296  #endif
3297  #ifdef CONFIGURE_SCHEDULER_USER_PER_THREAD
3298  CONFIGURE_SCHEDULER_USER_PER_THREAD User;
3299  #endif
3300  } Scheduler;
3301  RTEMS_API_Control API_RTEMS;
3302  #if defined(CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS)
3304  #endif
3305  #ifdef RTEMS_POSIX_API
3306  POSIX_API_Control API_POSIX;
3307  #endif
3308  #if !defined(RTEMS_SCHEDSIM) \
3309  && defined(RTEMS_NEWLIB) \
3310  && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)
3311  struct _reent Newlib;
3312  #else
3313  struct { /* Empty */ } Newlib;
3314  #endif
3315  } Configuration_Thread_control;
3316 
3317  const size_t _Thread_Control_size = sizeof( Configuration_Thread_control );
3318 
3320  {
3321  offsetof( Configuration_Thread_control, Control.Scheduler.node ),
3322  offsetof( Configuration_Thread_control, Scheduler )
3323  }, {
3324  offsetof(
3325  Configuration_Thread_control,
3326  Control.API_Extensions[ THREAD_API_RTEMS ]
3327  ),
3328  offsetof( Configuration_Thread_control, API_RTEMS )
3329  }, {
3330  offsetof(
3331  Configuration_Thread_control,
3332  Control.libc_reent
3333  ),
3334  offsetof( Configuration_Thread_control, Newlib )
3335  }
3336  #ifdef RTEMS_POSIX_API
3337  , {
3338  offsetof(
3339  Configuration_Thread_control,
3340  Control.API_Extensions[ THREAD_API_POSIX ]
3341  ),
3342  offsetof( Configuration_Thread_control, API_POSIX )
3343  }
3344  #endif
3345  };
3346 
3347  const size_t _Thread_Control_add_on_count =
3348  RTEMS_ARRAY_SIZE( _Thread_Control_add_ons );
3349 
3366  };
3367 
3368  #ifdef RTEMS_POSIX_API
3369 
3372  posix_api_configuration_table Configuration_POSIX_API = {
3374  CONFIGURE_POSIX_MUTEXES,
3375  CONFIGURE_POSIX_CONDITION_VARIABLES,
3376  CONFIGURE_MAXIMUM_POSIX_TIMERS,
3377  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
3378  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
3379  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS,
3380  CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
3381  CONFIGURE_MAXIMUM_POSIX_BARRIERS,
3382  CONFIGURE_MAXIMUM_POSIX_RWLOCKS,
3383  CONFIGURE_MAXIMUM_POSIX_SPINLOCKS,
3384  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
3385  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
3386  };
3387  #endif
3388 
3397  uint32_t rtems_minimum_stack_size =
3399 
3411 
3416  CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */
3417  CONFIGURE_STACK_SPACE_SIZE, /* required stack space */
3418  CONFIGURE_MAXIMUM_USER_EXTENSIONS, /* maximum dynamic extensions */
3419  CONFIGURE_POSIX_KEYS, /* POSIX keys are always */
3421  CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */
3422  1000 * CONFIGURE_MICROSECONDS_PER_TICK, /* nanoseconds per clock tick */
3423  CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */
3424  CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */
3425  CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */
3426  CONFIGURE_INTERRUPT_STACK_SIZE, /* interrupt stack size */
3427  CONFIGURE_TASK_STACK_ALLOCATOR_INIT, /* stack allocator init */
3428  CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */
3429  CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */
3430  CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */
3431  #ifdef CONFIGURE_UNIFIED_WORK_AREAS /* true for unified work areas */
3432  true,
3433  #else
3434  false,
3435  #endif
3436  #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE /* true to avoid
3437  work space for thread stack
3438  allocation */
3439  true,
3440  #else
3441  false,
3442  #endif
3443  #ifdef RTEMS_SMP
3444  #ifdef CONFIGURE_SMP_APPLICATION
3445  true,
3446  #else
3447  false,
3448  #endif
3449  #endif
3450  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of static extensions */
3451  CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to static extensions */
3452  #if defined(RTEMS_MULTIPROCESSING)
3453  CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
3454  #endif
3455  #ifdef RTEMS_SMP
3456  CONFIGURE_SMP_MAXIMUM_PROCESSORS,
3457  #endif
3458  };
3459 #endif
3460 
3461 #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
3462 
3463 #if defined(RTEMS_SMP)
3464  /*
3465  * Instantiate the Per CPU information based upon the user configuration.
3466  */
3467  #if defined(CONFIGURE_INIT)
3468  Per_CPU_Control_envelope _Per_CPU_Information[CONFIGURE_SMP_MAXIMUM_PROCESSORS];
3469  #endif
3470 
3471 #endif
3472 
3473 /*
3474  * If the user has configured a set of Classic API Initialization Tasks,
3475  * then we need to install the code that runs that loop.
3476  */
3477 #ifdef CONFIGURE_INIT
3478  #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) || \
3479  defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE)
3480  void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) =
3482  #else
3483  void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL;
3484  #endif
3485 #endif
3486 
3487 /*
3488  * If the user has configured a set of POSIX Initialization Threads,
3489  * then we need to install the code that runs that loop.
3490  */
3491 #ifdef RTEMS_POSIX_API
3492  #ifdef CONFIGURE_INIT
3493  #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \
3494  defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE)
3497  #else
3498  void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL;
3499  #endif
3500  #endif
3501 #endif
3502 
3503 /*
3504  * Select PCI Configuration Library
3505  */
3506 #ifdef RTEMS_PCI_CONFIG_LIB
3507  #ifdef CONFIGURE_INIT
3508  #define PCI_LIB_NONE 0
3509  #define PCI_LIB_AUTO 1
3510  #define PCI_LIB_STATIC 2
3511  #define PCI_LIB_READ 3
3512  #define PCI_LIB_PERIPHERAL 4
3513  #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO
3514  #define PCI_CFG_AUTO_LIB
3515  #include <pci/cfg.h>
3516  struct pci_bus pci_hb;
3517  #define PCI_LIB_INIT pci_config_auto
3518  #define PCI_LIB_CONFIG pci_config_auto_register
3519  #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC
3520  #define PCI_CFG_STATIC_LIB
3521  #include <pci/cfg.h>
3522  #define PCI_LIB_INIT pci_config_static
3523  #define PCI_LIB_CONFIG NULL
3524  /* Let user define PCI configuration (struct pci_bus pci_hb) */
3525  #elif CONFIGURE_PCI_LIB == PCI_LIB_READ
3526  #define PCI_CFG_READ_LIB
3527  #include <pci/cfg.h>
3528  #define PCI_LIB_INIT pci_config_read
3529  #define PCI_LIB_CONFIG NULL
3530  struct pci_bus pci_hb;
3531  #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL
3532  #define PCI_LIB_INIT pci_config_peripheral
3533  #define PCI_LIB_CONFIG NULL
3534  /* Let user define PCI configuration (struct pci_bus pci_hb) */
3535  #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE
3536  #define PCI_LIB_INIT NULL
3537  #define PCI_LIB_CONFIG NULL
3538  /* No PCI Configuration at all, user can use/debug access routines */
3539  #else
3540  #error NO PCI LIBRARY DEFINED
3541  #endif
3542 
3543  const int pci_config_lib_type = CONFIGURE_PCI_LIB;
3544  int (*pci_config_lib_init)(void) = PCI_LIB_INIT;
3545  void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG;
3546  #endif
3547 #endif
3548 
3549 #ifdef __cplusplus
3550 }
3551 #endif
3552 
3553 /******************************************************************
3554  ******************************************************************
3555  ******************************************************************
3556  * CONFIGURATION WARNINGS AND ERROR CHECKING *
3557  ******************************************************************
3558  ******************************************************************
3559  ******************************************************************
3560  */
3561 
3562 #if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT)
3563 
3570  typedef struct {
3571  uint32_t SYSTEM_OVERHEAD;
3572  uint32_t STATIC_EXTENSIONS;
3573  uint32_t INITIALIZATION_THREADS_STACKS;
3574 
3575  uint32_t PER_INTEGER_TASK;
3576  uint32_t FP_OVERHEAD;
3577  uint32_t CLASSIC;
3578  uint32_t POSIX;
3579 
3580  /* System overhead pieces */
3581  uint32_t INTERRUPT_STACK_MEMORY;
3582  uint32_t MEMORY_FOR_IDLE_TASK;
3583 
3584  /* Classic API Pieces */
3585  uint32_t CLASSIC_TASKS;
3586  uint32_t TASK_VARIABLES;
3587  uint32_t TIMERS;
3588  uint32_t SEMAPHORES;
3589  uint32_t MESSAGE_QUEUES;
3590  uint32_t PARTITIONS;
3591  uint32_t REGIONS;
3592  uint32_t PORTS;
3593  uint32_t PERIODS;
3594  uint32_t BARRIERS;
3595  uint32_t USER_EXTENSIONS;
3596 
3597  /* POSIX API managers that are always enabled */
3598  uint32_t POSIX_KEYS;
3599 
3600 #ifdef RTEMS_POSIX_API
3601  /* POSIX API Pieces */
3602  uint32_t POSIX_MUTEXES;
3603  uint32_t POSIX_CONDITION_VARIABLES;
3604  uint32_t POSIX_TIMERS;
3605  uint32_t POSIX_QUEUED_SIGNALS;
3606  uint32_t POSIX_MESSAGE_QUEUES;
3607  uint32_t POSIX_SEMAPHORES;
3608  uint32_t POSIX_BARRIERS;
3609  uint32_t POSIX_SPINLOCKS;
3610  uint32_t POSIX_RWLOCKS;
3611 #endif
3612 
3613  /* Stack space sizes */
3614  uint32_t IDLE_TASKS_STACK;
3615  uint32_t INITIALIZATION_THREADS_EXTRA_STACKS;
3616  uint32_t TASKS_STACK;
3617  uint32_t POSIX_THREADS_STACK;
3618  uint32_t GOROUTINES_STACK;
3619  uint32_t ADA_TASKS_STACK;
3620  uint32_t EXTRA_MPCI_RECEIVE_SERVER_STACK;
3621  uint32_t EXTRA_TASK_STACKS;
3622  } Configuration_Debug_t;
3623 
3624  Configuration_Debug_t Configuration_Memory_Debug = {
3625  /* General Information */
3633 
3634  /* System overhead pieces */
3637 
3638  /* Classic API Pieces */
3653 
3654 #ifdef RTEMS_POSIX_API
3655  /* POSIX API Pieces */
3656  CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_POSIX_MUTEXES ),
3657  CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
3658  CONFIGURE_POSIX_CONDITION_VARIABLES ),
3659  CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
3660  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
3661  CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
3662  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
3663  CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
3664  CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ),
3665  CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ),
3666  CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ),
3667  CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
3668 #endif
3669 
3670  /* Stack space sizes */
3679  };
3680 #endif
3681 
3682 /*
3683  * Make sure a task/thread of some sort is configured.
3684  *
3685  * When analyzing RTEMS to find the smallest possible of memory
3686  * that must be allocated, you probably do want to configure 0
3687  * tasks/threads so there is a smaller set of calls to _Workspace_Allocate
3688  * to analyze.
3689  */
3690 #if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
3691  #if (CONFIGURE_MAXIMUM_TASKS == 0) && \
3692  (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
3693  (CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \
3694  (CONFIGURE_MAXIMUM_GOROUTINES == 0)
3695  #error "CONFIGURATION ERROR: No tasks or threads configured!!"
3696  #endif
3697 #endif
3698 
3699 #ifndef RTEMS_SCHEDSIM
3700 /*
3701  * Make sure at least one of the initialization task/thread
3702  * tables was defined.
3703  */
3704 #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
3705  !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
3706  !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
3707 #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
3708 #endif
3709 #endif
3710 
3711 /*
3712  * If the user is trying to configure a multiprocessing application and
3713  * RTEMS was not configured and built multiprocessing, then error out.
3714  */
3715 #if defined(CONFIGURE_MP_APPLICATION) && \
3716  !defined(RTEMS_MULTIPROCESSING)
3717 #error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!"
3718 #endif
3719 
3720 /*
3721  * If an attempt was made to configure POSIX objects and
3722  * the POSIX API was not configured into RTEMS, error out.
3723  *
3724  * @note POSIX Keys are always available so the parameters
3725  * CONFIGURE_MAXIMUM_POSIX_KEYS and
3726  * CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS are not in this list.
3727  */
3728 #if !defined(RTEMS_POSIX_API)
3729  #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
3730  (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
3731  (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
3732  (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
3733  (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
3734  (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
3735  (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS != 0) || \
3736  (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \
3737  (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \
3738  (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \
3739  (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \
3740  defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
3741  #error "CONFIGURATION ERROR: POSIX API support not configured!!"
3742  #endif
3743 #endif
3744 
3745 #if !defined(RTEMS_SCHEDSIM)
3746  #if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE)
3747  /*
3748  * You must either explicity include or exclude the clock driver.
3749  * It is such a common newbie error to leave it out. Maybe this
3750  * will put an end to it.
3751  *
3752  * NOTE: If you are using the timer driver, it is considered
3753  * mutually exclusive with the clock driver because the
3754  * drivers are assumed to use the same "timer" hardware
3755  * on many boards.
3756  */
3757  #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
3758  !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \
3759  !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER)
3760  #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?"
3761  #endif
3762 
3763  /*
3764  * Only one of the following three configuration parameters should be
3765  * defined at a time.
3766  */
3767  #if ((defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) + \
3768  defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) + \
3769  defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER)) > 1)
3770  #error "CONFIGURATION ERROR: More than one clock/timer driver configuration parameter specified?!?"
3771  #endif
3772  #endif /* !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE) */
3773 #endif /* !defined(RTEMS_SCHEDSIM) */
3774 
3775 /*
3776  * These names have been obsoleted so make the user application stop compiling
3777  */
3778 #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
3779  defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \
3780  defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \
3781  defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \
3782  defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER)
3783 #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
3784 #endif
3785 
3786 /*
3787  * Validate the configured maximum priority
3788  */
3789 #if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \
3790  (CONFIGURE_MAXIMUM_PRIORITY != 7) && \
3791  (CONFIGURE_MAXIMUM_PRIORITY != 15) && \
3792  (CONFIGURE_MAXIMUM_PRIORITY != 31) && \
3793  (CONFIGURE_MAXIMUM_PRIORITY != 63) && \
3794  (CONFIGURE_MAXIMUM_PRIORITY != 127) && \
3795  (CONFIGURE_MAXIMUM_PRIORITY != 255))
3796  #error "Maximum priority is not 1 less than a power of 2 between 4 and 256"
3797 #endif
3798 
3799 #if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM)
3800  #error "Maximum priority configured higher than supported by target."
3801 #endif
3802 
3803 /*
3804  * If you have fewer POSIX Message Queue Descriptors than actual
3805  * POSIX Message Queues, then you will not be able to open all the
3806  * queues.
3807  */
3808 #if (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS < \
3809  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
3810  #error "Fewer POSIX Message Queue descriptors than Queues!"
3811 #endif
3812 
3813 /*
3814  * POSIX Key pair shouldn't be less than POSIX Key, which is highly
3815  * likely to be error.
3816  */
3817 #if (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) && \
3818  (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS != 0)
3819  #if (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS < CONFIGURE_MAXIMUM_POSIX_KEYS)
3820  #error "Fewer POSIX Key pairs than POSIX Key!"
3821  #endif
3822 #endif
3823 
3824 /*
3825  * IMFS block size for in memory files (memfiles) must be a power of
3826  * two between 16 and 512 inclusive.
3827  */
3828 #if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \
3829  (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \
3830  (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \
3831  (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \
3832  (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \
3833  (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512))
3834  #error "IMFS Memfile block size must be a power of 2 between 16 and 512"
3835 #endif
3836 
3837 
3838 #endif
3839 /* end of include file */
Frame Buffer Device Driver for all Boards.
const size_t _Thread_Control_add_on_count
Thread control add-on count.
void rtems_filesystem_initialize(void)
Base File System Initialization.
Definition: base_fs.c:32
void * _Thread_Idle_body(uintptr_t ignored)
This routine is the body of the system idle thread.
int rtems_filesystem_default_utime(const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime)
Definition: default_utime.c:24
MPCI Layer API.
#define CONFIGURE_INTERRUPT_STACK_SIZE
Interrupt stack size configuration.
Definition: confdefs.h:1226
This file describes the Watchdog Driver for all boards.
The following records define the POSIX Configuration Table.
Definition: config.h:58
#define CONFIGURE_IDLE_TASK_BODY
Idle task body configuration.
Definition: confdefs.h:1162
bool rtems_filesystem_default_are_nodes_equal(const rtems_filesystem_location_info_t *a, const rtems_filesystem_location_info_t *b)
Tests if the node access pointer of one location is equal to the node access pointer of the other loc...
Definition: default_are_nodes_equal.c:28
#define CONFIGURE_MEMORY_FOR_POSIX
This macro is calculated to specify the memory required for the POSIX API in its entirety.
Definition: confdefs.h:2946
uint8_t rtems_maximum_priority
This variable contains the configured number of priorities.
Definition: deflate.c:116
#define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables)
This macro is calculated to specify the memory required for task variables.
Definition: confdefs.h:2132
#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions)
This macro is calculated to specify the memory required for Classic API User Extensions.
Definition: confdefs.h:2352
#define CONFIGURE_MEMORY_FOR_IDLE_TASK
This defines the formula used to compute the amount of memory reserved for IDLE task control structur...
Definition: confdefs.h:3052
int rtems_filesystem_default_link(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen)
Definition: default_link.c:23
Definition: imfs.h:384
#define CONFIGURE_MAXIMUM_TIMERS
This specifies the maximum number of Classic API timers.
Definition: confdefs.h:2143
#define CONFIGURE_IDLE_TASK_STACK_SIZE
Idle task stack size configuration.
Definition: confdefs.h:1209
#define CONFIGURE_POSIX_THREADS_STACK
This macro is calculated to specify the memory required for the stacks of all POSIX threads...
Definition: confdefs.h:3208
SCORE_EXTERN Heap_Control _Workspace_Area
Executive workspace control.
Definition: wkspace.h:46
Scheduler control.
Definition: scheduler.h:192
int IMFS_link(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen)
Create a new IMFS link node.
Definition: imfs_link.c:25
#define CONFIGURE_INIT_TASK_STACK_SIZE
This is the stack size of the Initialization Task when none is configured.
Definition: confdefs.h:1557
#define CONFIGURE_MAXIMUM_TASK_VARIABLES
This macro calculates the memory required for task variables.
Definition: confdefs.h:2125
#define CONFIGURE_MAXIMUM_PORTS
This configuration parameter specifies the maximum number of Classic API Dual-Ported Memory Ports...
Definition: confdefs.h:2279
This is the API specific information required by each thread for the RTEMS API to function correctly...
Definition: tasks.h:661
#define CONFIGURE_TASK_STACK_ALLOCATOR
This specifies the task stack allocator method.
Definition: confdefs.h:1259
#define CONFIGURE_MEMORY_FOR_TIMERS(_timers)
This macro is calculated to specify the memory required for Classic API timers.
Definition: confdefs.h:2150
Scheduler node specialization for EDF schedulers.
Definition: scheduleredf.h:96
const rtems_filesystem_table_t rtems_filesystem_table[]
Static table of file systems.
int rtems_filesystem_default_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_unmount.c:21
int IMFS_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Mount an IMFS.
Definition: imfs_mount.c:26
#define CONFIGURE_MAXIMUM_REGIONS
This configuration parameter specifies the maximum number of Classic API Regions. ...
Definition: confdefs.h:2261
#define CONFIGURE_GOROUTINES_STACK
This macro is calculated to specify the memory required for the stacks of all Go routines.
Definition: confdefs.h:3228
void rtems_task
The following defines the "return type" of an RTEMS task.
Definition: tasks.h:161
#define CONFIGURE_MAXIMUM_DRIVERS
This specifies the maximum number of device drivers that can be installed in the system at one time...
Definition: confdefs.h:1633
void IMFS_node_free(const rtems_filesystem_location_info_t *loc)
Free an IMFS node.
Definition: imfs_initsupp.c:157
#define CONFIGURE_POSIX_THREADS
This macro provides a summation of the various POSIX thread requirements.
Definition: confdefs.h:2884
void rtems_filesystem_default_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
Releases the IO library mutex.
Definition: default_lock_and_unlock.c:35
#define CONFIGURE_MAXIMUM_PTYS
This macro specifies the number of PTYs that can be concurrently active.
Definition: confdefs.h:213
int rtems_telnetd_maximum_ptys
This variable contains the maximum number of PTYs that can be concurrently active.
The following records define the Configuration Table.
Definition: config.h:49
#define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
Should the RTEMS Workspace and C Program Heap be cleared automatically at system start up...
Definition: confdefs.h:1286
Heap_Control * RTEMS_Malloc_Heap
C program heap control.
#define CONSOLE_DRIVER_TABLE_ENTRY
This macro defines the standard device driver table entry for a console device driver.
Definition: console.h:38
#define CONFIGURE_EXECUTIVE_RAM_SIZE
This calculates the memory required for the executive workspace.
Definition: confdefs.h:3118
#define CONFIGURE_ADA_TASKS_STACK
This macro is calculated to specify the memory required for the stacks of all Ada tasks...
Definition: confdefs.h:3218
File system table entry.
Definition: libio.h:1594
POSIX Threads Private Support.
rtems_api_configuration_table Configuration_RTEMS_API
RTEMS API Configuration Table.
const rtems_configuration_table Configuration
This is the configuration table generated by confdefs.h.
void rtems_malloc_dirty_memory(void *start, size_t size)
Dirty Memory Function.
Definition: malloc_dirtier.c:28
Buffering configuration definition.
Definition: bdbuf.h:367
ssize_t rtems_filesystem_default_readlink(const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize)
Definition: default_readlink.c:24
#define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks)
Account for allocating the following per object.
Definition: confdefs.h:2970
This value is for the Classic RTEMS API.
Definition: thread.h:427
int rtems_filesystem_default_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Definition: default_fchmod.c:23
#define CONFIGURE_MICROSECONDS_PER_TICK
The configures the number of microseconds per clock tick.
Definition: confdefs.h:2371
POSIX Thread API Support.
#define CONFIGURE_MAXIMUM_TASKS
This configures the maximum number of Classic API tasks.
Definition: confdefs.h:2075
#define RTEMS_STACK_CHECKER_EXTENSION
Stack Checker Extension Set Definition.
Definition: stackchk.h:135
Definition: imfs.h:389
const uint32_t _Scheduler_CBS_Maximum_servers
Maximum number of simultaneous servers.
Internal Information about POSIX Signals.
POSIX MUTEX Support.
#define CONFIGURE_MEMORY_FOR_CLASSIC
This macro provides a summation of the memory required by the Classic API as configured.
Definition: confdefs.h:3084
#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD
This macro accounts for general RTEMS system overhead.
Definition: confdefs.h:3063
#define CONFIGURE_IDLE_TASKS_STACK
This macro is calculated to specify the memory required for the Idle tasks(s) stack.
Definition: confdefs.h:3188
void IMFS_eval_path(rtems_filesystem_eval_path_context_t *ctx)
IMFS evaluation node support.
Definition: imfs_eval.c:175
#define CONFIGURE_SCHEDULER_CONTROLS
Configure the controls for this scheduler instance.
Definition: confdefs.h:854
POSIX Timers Internal Support.
Definition: io.h:52
Definition: percpu.h:381
int IMFS_node_clone(rtems_filesystem_location_info_t *loc)
Clone an IMFS node.
Definition: imfs_initsupp.c:141
#define CONFIGURE_SEMAPHORES
This macro is calculated to specify the number of Classic API semaphores required by the application ...
Definition: confdefs.h:2179
#define NULL_DRIVER_TABLE_ENTRY
This is an empty device driver slot.
Definition: confdefs.h:1578
#define WATCHDOG_DRIVER_TABLE_ENTRY
This macro defines the watchdog device driver entry points.
Definition: watchdogdrv.h:30
#define CONFIGURE_SCHEDULER_CONTEXT
Configure the context needed by the scheduler instance.
Definition: confdefs.h:847
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE
By default, use the minimum stack size requested by this port.
Definition: confdefs.h:1189
void _RTEMS_tasks_Initialize_user_tasks_body(void)
_RTEMS_tasks_Initialize_user_tasks_body
Definition: taskinitusers.c:44
Definition: config.h:128
Priority_Control rtems_task_priority
Define the type for an RTEMS API task priority.
Definition: tasks.h:79
This include file defines the per CPU information required by RTEMS.
Public Interface to the NFS Client Library for RTEMS.
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers)
This macro is calculated to specify the memory required for Classic API Barriers. ...
Definition: confdefs.h:2334
RTEMS Benchmark Timer API for all Boards.
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Definition: cfg.h:229
void(* _POSIX_Threads_Initialize_user_threads_p)(void)
When the user configures a set of POSIX API initialization threads, This variable will point to the m...
#define CONFIGURE_MEMORY_FOR_PERIODS(_periods)
This macro is calculated to specify the memory required for Classic API Rate Monotonic Periods...
Definition: confdefs.h:2304
#define CONFIGURE_MAXIMUM_PARTITIONS
This configuration parameter specifies the maximum number of Classic API Partitions.
Definition: confdefs.h:2243
#define CONFIGURE_INIT_TASK_TABLE
This is the name of the Initialization Task when none is configured.
Definition: confdefs.h:1543
Information Related to the RAM Workspace.
#define CONFIGURE_TASKS_STACK
This macro is calculated to specify the memory required for the stacks of all tasks.
Definition: confdefs.h:3198
Thread control add-on.
Definition: thread.h:857
#define CONFIGURE_TASKS
This is calculated to account for the maximum number of Classic API tasks used by the application and...
Definition: confdefs.h:2084
Constants and Structures Associated with the POSIX Barrier Manager.
#define CONFIGURE_INTERRUPT_STACK_MEMORY
This reserves memory for the interrupt stack if it is to be allocated by RTEMS rather than the BSP...
Definition: confdefs.h:1238
struct _reent * libc_reent
This field points to the newlib reentrancy structure for this thread.
Definition: thread.h:795
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS
This configuration parameter specifies the maximum number of Classic API User Extensions.
Definition: confdefs.h:2345
int rtems_filesystem_default_symlink(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target)
Definition: default_symlink.c:24
API Mutex Handler API.
void _POSIX_Threads_Initialize_user_threads_body(void)
POSIX threads initialize user threads body.
Definition: pthreadinitthreads.c:39
int IMFS_mknod(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
Create an IMFS node.
Definition: imfs_mknod.c:43
int rtems_filesystem_default_rmnod(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc)
Definition: default_rmnod.c:24
#define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER
This defines the timers required for the shared memory driver in a multiprocessing configuration...
Definition: confdefs.h:1884
int IMFS_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Change the IMFS file mode.
Definition: imfs_fchmod.c:23
Control block used to manage a heap.
Definition: heap.h:342
Scheduler node specialization for SMP schedulers.
Definition: schedulersmp.h:98
#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions)
This macro is calculated to specify the memory required for Classic API.
Definition: confdefs.h:2250
Scheduler node specialization for Deterministic Priority schedulers.
Definition: schedulerpriority.h:90
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
List of servers.
#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues)
This macro is calculated to specify the RTEMS Workspace required for the Classic API Message Queues...
Definition: confdefs.h:2232
POSIX Message Queues Private Private Support.
int IMFS_chown(const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
Change the owner of IMFS.
Definition: imfs_chown.c:27
Per Device Node Control Structure.
Definition: devfs.h:33
int IMFS_symlink(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target)
Create a new IMFS symbolic link node.
Definition: imfs_symlink.c:27
uint32_t rtems_minimum_stack_size
This variable contains the the minimum stack size;.
void rtems_libio_init(void)
RTEMS LibIO Initialization.
Definition: libio_init.c:43
This structure represents a time server.
Definition: schedulercbs.h:107
#define CONFIGURE_INIT_TASK_TABLE_SIZE
This is the size of the Initialization Task when none is configured.
Definition: confdefs.h:1550
POSIX Spinlock Support.
Standard C Library Support.
void(* _RTEMS_tasks_Initialize_user_tasks_p)(void)
When the user configures a set of Classic API initialization tasks, This variable will point to the m...
#define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE
Instructs the compiler to issue a warning whenever a variable or function with this attribute will be...
Definition: basedefs.h:186
#define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
This defines the extra stack space required for the MPCI server thread.
Definition: confdefs.h:1876
#define CONFIGURE_MEMORY_FOR_PORTS(_ports)
This macro is calculated to specify the memory required for Classic API Dual-Ported Memory Ports...
Definition: confdefs.h:2286
#define CONFIGURE_TASK_STACK_DEALLOCATOR
This specifies the task stack deallocator method.
Definition: confdefs.h:1263
int IMFS_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Unmount an IMFS.
Definition: imfs_unmount.c:26
const rtems_bdbuf_config rtems_bdbuf_configuration
External reference to the configuration.
Private Support Information for POSIX Semaphores.
File system operations table.
Definition: libio.h:471
Definition: libio.h:1797
This value is for the POSIX API.
Definition: thread.h:429
#define CONFIGURE_BARRIERS
This macro is calculated to specify the number of Classic API Barriers required by the application an...
Definition: confdefs.h:2324
LibIO Internal Interface.
int IMFS_rmnod(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc)
IMFS node removal handler.
Definition: imfs_rmnod.c:26
int rtems_filesystem_default_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_mount.c:21
This defines the POSIX API support structure associated with each thread in a system with POSIX confi...
Definition: threadsup.h:44
ssize_t IMFS_readlink(const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize)
Put IMFS symbolic link into buffer.
Definition: imfs_symlink.c:56
File Transfer Protocol file system (FTP client).
int IMFS_utime(const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime)
Set IMFS file access and modification times.
Definition: imfs_utime.c:25
#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT
Configure the very much optional task stack allocator initialization.
Definition: confdefs.h:1248
Definition: devfs.h:46
Definition: imfs.h:377
void rtems_filesystem_default_fsunmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_fsunmount.c:20
#define RTEMS_NUMBER_NOTEPADS
This is used to indicate the number of notepads available.
Definition: tasks.h:151
#define CONFIGURE_MEMORY_FOR_REGIONS(_regions)
This macro is calculated to specify the memory required for Classic API Regions.
Definition: confdefs.h:2268
#define CONFIGURE_EXTRA_TASK_STACKS
This is so we can account for tasks with stacks greater than minimum size.
Definition: confdefs.h:2878
Thread_Entry_numeric_type rtems_task_argument
The following defines the argument to an RTEMS task.
Definition: tasks.h:166
rtems_initialization_tasks_table Initialization_tasks[]
This is the Classic API initialization tasks table.
int rtems_filesystem_default_statvfs(const rtems_filesystem_location_info_t *loc, struct statvfs *buf)
Definition: default_statvfs.c:23
Scheduler node for per-thread data.
Definition: scheduler.h:281
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:64
const Scheduler_Control _Scheduler_Table[]
Registered schedulers.
#define CONFIGURE_TICKS_PER_TIMESLICE
The configures the number of clock ticks per timeslice.
Definition: confdefs.h:2377
An open file data structure.
Definition: libio.h:1281
posix_api_configuration_table Configuration_POSIX_API
POSIX API configuration table.
User extension table.
Definition: userext.h:232
#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys, _key_value_pairs)
This macro is calculated to specify the memory required for POSIX API keys.
Definition: confdefs.h:2480
#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS
This macro is calculated to specify the memory required for POSIX API key/value pairs.
Definition: confdefs.h:2459
int rtems_filesystem_default_rename(const rtems_filesystem_location_info_t *oldparentloc, const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen)
Definition: default_rename.c:24
const size_t _Thread_Control_size
Size of the thread control block of a particular application.
POSIX Condition Variables Private Support.
This file defines the interface to RTEMS extensions to the Malloc Family.
#define CONFIGURE_GOROUTINES_TASK_VARIABLES
This specifies the maximum number of Go per-task variables required.
Definition: confdefs.h:2866
This structure handles CBS specific data of a thread.
Definition: schedulercbs.h:130
#define CONFIGURE_MAXIMUM_PERIODS
This configuration parameter specifies the maximum number of Classic API Rate Monotonic Periods...
Definition: confdefs.h:2297
void * rtems_heap_extend_via_sbrk(Heap_Control *heap, size_t alloc_size)
RTEMS Extend Heap via Sbrk.
Definition: rtems_heap_extend_via_sbrk.c:34
#define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS
This macro provides a summation of the various initialization task and thread stack requirements...
Definition: confdefs.h:3178
POSIX Key Private Support.
#define RTC_DRIVER_TABLE_ENTRY
Device driver table entry.
Definition: rtc.h:43
The following records define the Initialization Tasks Table.
Definition: tasks.h:181
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores)
This macro is calculated to specify the memory required for Classic API Semaphores.
Definition: confdefs.h:2215
#define CONFIGURE_STACK_SPACE_SIZE
This macro is calculated to specify the memory required for all tasks and threads of all varieties...
Definition: confdefs.h:3257
Constants and Structures Associated with the POSIX RWLock Manager.
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
This macro defines the number of POSIX file descriptors allocated and managed by libio.
Definition: confdefs.h:152
int rtems_filesystem_default_mknod(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
Definition: default_mknod.c:24
const Thread_Control_add_on _Thread_Control_add_ons[]
Thread control add-ons.
#define CONFIGURE_NOTEPADS_ENABLED
This configuration parameter enables/disables Classic API notepads.
Definition: confdefs.h:2102
#define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS
This macro reserves the memory required by the statically configured user extensions.
Definition: confdefs.h:3073
int rtems_filesystem_default_chown(const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
Definition: default_chown.c:23
For now, we are only allowing the user to specify the entry point and stack size for POSIX initializa...
Definition: config.h:42
void rtems_filesystem_default_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
Obtains the IO library mutex.
Definition: default_lock_and_unlock.c:28
Scheduler Configuration API.
#define CONFIGURE_MAXIMUM_PRIORITY
Maximum priority configuration.
Definition: confdefs.h:776
Scheduler node specialization for Deterministic Priority Affinity SMP schedulers. ...
Definition: schedulerpriorityaffinitysmp.h:173
int IMFS_rename(const rtems_filesystem_location_info_t *oldparentloc, const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen)
Rename the IMFS.
Definition: imfs_rename.c:26
Block Device Buffer Management.
#define FRAME_BUFFER_DRIVER_TABLE_ENTRY
This macro defines the standard device driver table entry for a frame buffer device driver...
Definition: framebuffer.h:45
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES
This configuration parameter specifies the maximum number of Classic API Message Queues.
Definition: confdefs.h:2225
#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
IMFS.
Definition: confdefs.h:387
RTEMS_INLINE_ROUTINE struct Thread_Control * _Thread_Get_executing(void)
Returns the thread control block of the executing thread.
Definition: percpu.h:614
#define CONFIGURE_POSIX_KEYS
This macro is calculated to specify the total number of POSIX API keys required by the application an...
Definition: confdefs.h:2471
#define _Scheduler_Count
Count of registered schedulers.
Definition: scheduler.h:352