Changeset 308a2e0f in rtems


Ignore:
Timestamp:
Feb 14, 2020, 11:58:21 AM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
c70d112
Parents:
b8648bd
git-author:
Sebastian Huber <sebastian.huber@…> (02/14/20 11:58:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/25/20 06:15:18)
Message:

config: Add _Watchdog_Ticks_per_timeslice

Move the ticks per timeslice configuration constant out of the
configuration table.

Add WATCHDOG_TICKS_PER_TIMESLICE_DEFAULT and use it to provide a default
definition of the watchdog ticks per timeslice constant.

Update #3875.

Location:
cpukit
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    rb8648bd r308a2e0f  
    10031003librtemscpu_a_SOURCES += score/src/watchdogtick.c
    10041004librtemscpu_a_SOURCES += score/src/watchdogtickssinceboot.c
     1005librtemscpu_a_SOURCES += score/src/watchdogtimeslicedefault.c
    10051006librtemscpu_a_SOURCES += score/src/userextaddset.c
    10061007librtemscpu_a_SOURCES += score/src/userext.c
  • cpukit/include/rtems/confdefs.h

    rb8648bd r308a2e0f  
    19681968
    19691969/** The configures the number of clock ticks per timeslice. */
    1970 #ifndef CONFIGURE_TICKS_PER_TIMESLICE
    1971   #define CONFIGURE_TICKS_PER_TIMESLICE        50
    1972 #endif
     1970#if defined(CONFIGURE_TICKS_PER_TIMESLICE) && \
     1971  CONFIGURE_TICKS_PER_TIMESLICE != WATCHDOG_TICKS_PER_TIMESLICE_DEFAULT
     1972
     1973#ifdef CONFIGURE_INIT
     1974  const uint32_t _Watchdog_Ticks_per_timeslice =
     1975    CONFIGURE_TICKS_PER_TIMESLICE;
     1976#endif
     1977
     1978#endif /* CONFIGURE_TICKS_PER_TIMESLICE */
    19731979
    19741980/**@}*/ /* end of General Configuration */
     
    26272633  const rtems_configuration_table Configuration = {
    26282634    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
    2629     CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
    26302635    CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
    26312636    CONFIGURE_IDLE_TASK_STACK_SIZE,           /* IDLE task stack size */
  • cpukit/include/rtems/config.h

    rb8648bd r308a2e0f  
    8888
    8989  /**
    90    * This field specifies the number of ticks in each task's timeslice.
    91    */
    92   uint32_t                       ticks_per_timeslice;
    93 
    94   /**
    9590   * This element points to the BSP's optional idle task which may override
    9691   * the default one provided with RTEMS.
     
    164159
    165160#define rtems_configuration_get_ticks_per_timeslice() \
    166         (Configuration.ticks_per_timeslice)
     161        (_Watchdog_Ticks_per_timeslice)
    167162
    168163#define rtems_configuration_get_idle_task() \
  • cpukit/include/rtems/score/watchdogticks.h

    rb8648bd r308a2e0f  
    4444
    4545/**
     46 * @brief Default value for the watchdog ticks per timeslice.
     47 */
     48#define WATCHDOG_TICKS_PER_TIMESLICE_DEFAULT 50
     49
     50/**
    4651 * @brief The watchdog ticks counter.
    4752 *
     
    7479extern const uint32_t _Watchdog_Ticks_per_second;
    7580
     81/**
     82 * @brief The watchdog ticks per timeslice.
     83 *
     84 * This constant is defined by the application configuration via
     85 * <rtems/confdefs.h>.
     86 */
     87extern const uint32_t _Watchdog_Ticks_per_timeslice;
     88
    7689/** @} */
    7790
Note: See TracChangeset for help on using the changeset viewer.