Changeset 9bdb6aa3 in rtems


Ignore:
Timestamp:
Feb 14, 2020, 8:48:41 AM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
3b4795b4
Parents:
a9bc7a5
git-author:
Sebastian Huber <sebastian.huber@…> (02/14/20 08:48:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/25/20 06:15:18)
Message:

config: Bring back RTEMS 4.11 configuration table

This improves API backward compatibility of RTEMS 5.1 to previous
versions.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/rtems/config.h

    ra9bc7a5 r9bdb6aa3  
    4545 */
    4646typedef struct {
     47  /**
     48   * This field contains the maximum number of Classic API
     49   * Tasks which are configured for this application.
     50   */
     51  uint32_t                    maximum_tasks;
     52
     53  /**
     54   * This field indicates whether Classic API notepads are
     55   * enabled or disabled.
     56   */
     57  bool                        notepads_enabled;
     58
     59  /**
     60   * This field contains the maximum number of Classic API
     61   * Timers which are configured for this application.
     62   */
     63  uint32_t                    maximum_timers;
     64
     65  /**
     66   * This field contains the maximum number of Classic API
     67   * Semaphores which are configured for this application.
     68   */
     69  uint32_t                    maximum_semaphores;
     70
     71  /**
     72   * This field contains the maximum number of Classic API
     73   * Message Queues which are configured for this application.
     74   */
     75  uint32_t                    maximum_message_queues;
     76
     77  /**
     78   * This field contains the maximum number of Classic API
     79   * Partitions which are configured for this application.
     80   */
     81  uint32_t                    maximum_partitions;
     82
     83  /**
     84   * This field contains the maximum number of Classic API
     85   * Regions which are configured for this application.
     86   */
     87  uint32_t                    maximum_regions;
     88
     89  /**
     90   * This field contains the maximum number of Classic API
     91   * Dual Ported Memory Areas which are configured for this
     92   * application.
     93   */
     94  uint32_t                    maximum_ports;
     95
     96  /**
     97   * This field contains the maximum number of Classic API
     98   * Rate Monotonic Periods which are configured for this
     99   * application.
     100   */
     101  uint32_t                    maximum_periods;
     102
     103  /**
     104   * This field contains the maximum number of Classic API
     105   * Barriers which are configured for this application.
     106   */
     107  uint32_t                    maximum_barriers;
    47108
    48109  /**
  • cpukit/rtems/src/getapiconfig.c

    ra9bc7a5 r9bdb6aa3  
    3838rtems_configuration_get_rtems_api_configuration( void )
    3939{
     40  /*
     41   * Always initialize the configuration table and do not bother with
     42   * synchronization issues.  This function is not performance critical.  The
     43   * configuration values are all constants.
     44   */
     45
     46  config.notepads_enabled = false;
     47  config.maximum_tasks = rtems_configuration_get_maximum_tasks();
     48  config.maximum_timers = rtems_configuration_get_maximum_timers();
     49  config.maximum_semaphores = rtems_configuration_get_maximum_semaphores();
     50  config.maximum_message_queues =
     51    rtems_configuration_get_maximum_message_queues();
     52  config.maximum_partitions = rtems_configuration_get_maximum_partitions();
     53  config.maximum_regions = rtems_configuration_get_maximum_regions();
     54  config.maximum_ports = rtems_configuration_get_maximum_ports();
     55  config.maximum_periods = rtems_configuration_get_maximum_periods();
     56  config.maximum_barriers = rtems_configuration_get_maximum_barriers();
     57
    4058  if ( _RTEMS_tasks_User_task_table.entry_point != NULL ) {
    4159    config.number_of_initialization_tasks = 1;
  • testsuites/sptests/spsysinit01/init.c

    ra9bc7a5 r9bdb6aa3  
    906906}
    907907
     908static void check_config(void)
     909{
     910  const rtems_api_configuration_table *config;
     911
     912  config = rtems_configuration_get_rtems_api_configuration();
     913
     914  rtems_test_assert(!config->notepads_enabled);
     915  rtems_test_assert(config->maximum_tasks == 2);
     916  rtems_test_assert(config->maximum_timers == 1);
     917  rtems_test_assert(config->maximum_semaphores == 1);
     918  rtems_test_assert(config->maximum_message_queues == 1);
     919  rtems_test_assert(config->maximum_partitions == 1);
     920  rtems_test_assert(config->maximum_regions == 1);
     921  rtems_test_assert(config->maximum_ports == 1);
     922  rtems_test_assert(config->maximum_periods == 1);
     923  rtems_test_assert(config->maximum_barriers == 1);
     924  rtems_test_assert(config->number_of_initialization_tasks == 1);
     925  rtems_test_assert(config->User_initialization_tasks_table != NULL);
     926}
     927
    908928static void Init(rtems_task_argument arg)
    909929{
     
    924944  do_posix_shm_open();
    925945  do_posix_timer_create();
     946  check_config();
    926947  TEST_END();
    927948  exit(0);
Note: See TracChangeset for help on using the changeset viewer.