Changeset b8648bd in rtems


Ignore:
Timestamp:
Feb 13, 2020, 4:16:15 PM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
308a2e0f
Parents:
3b4795b4
git-author:
Sebastian Huber <sebastian.huber@…> (02/13/20 16:16:15)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/25/20 06:15:18)
Message:

config: Add _Watchdog_Microseconds_per_tick

Move the microseconds per tick configuration constant out of the
configuration table.

Add WATCHDOG_MICROSECONDS_PER_TICK_DEFAULT and use it to provide a
default definition of the watchdog ticks constants.

Update #3875.

Location:
cpukit/include/rtems
Files:
3 edited

Legend:

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

    r3b4795b4 rb8648bd  
    19561956#endif
    19571957
    1958 #define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK)
     1958#ifdef CONFIGURE_INIT
     1959  const uint32_t _Watchdog_Microseconds_per_tick =
     1960    CONFIGURE_MICROSECONDS_PER_TICK;
     1961
     1962  const uint32_t _Watchdog_Nanoseconds_per_tick =
     1963    (uint32_t) 1000 * CONFIGURE_MICROSECONDS_PER_TICK;
     1964
     1965  const uint32_t _Watchdog_Ticks_per_second =
     1966    1000000 / CONFIGURE_MICROSECONDS_PER_TICK;
     1967#endif
    19591968
    19601969/** The configures the number of clock ticks per timeslice. */
     
    24532462  #endif
    24542463
    2455   const uint32_t _Watchdog_Nanoseconds_per_tick =
    2456     (uint32_t) 1000 * CONFIGURE_MICROSECONDS_PER_TICK;
    2457 
    2458   const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND;
    2459 
    24602464  const size_t _Thread_Initial_thread_count =
    24612465    rtems_resource_maximum_per_allocation( _CONFIGURE_TASKS ) +
     
    26232627  const rtems_configuration_table Configuration = {
    26242628    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
    2625     CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
    26262629    CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
    26272630    CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
  • cpukit/include/rtems/config.h

    r3b4795b4 rb8648bd  
    8888
    8989  /**
    90    * This field specifies the number of microseconds which elapse
    91    * between clock ticks.  This is the basis for RTEMS timing.
    92    */
    93   uint32_t                       microseconds_per_tick;
    94 
    95   /**
    9690   * This field specifies the number of ticks in each task's timeslice.
    9791   */
     
    163157
    164158#define rtems_configuration_get_microseconds_per_tick() \
    165         (Configuration.microseconds_per_tick)
     159        (_Watchdog_Microseconds_per_tick)
    166160#define rtems_configuration_get_milliseconds_per_tick() \
    167         (Configuration.microseconds_per_tick / 1000)
     161        (_Watchdog_Microseconds_per_tick / 1000)
    168162#define rtems_configuration_get_nanoseconds_per_tick() \
    169163        (_Watchdog_Nanoseconds_per_tick)
  • cpukit/include/rtems/score/watchdogticks.h

    r3b4795b4 rb8648bd  
    5151
    5252/**
     53 * @brief The watchdog microseconds per tick.
     54 *
     55 * This constant is defined by the application configuration via
     56 * <rtems/confdefs.h>.
     57 */
     58extern const uint32_t _Watchdog_Microseconds_per_tick;
     59
     60/**
    5361 * @brief The watchdog nanoseconds per tick.
    5462 *
Note: See TracChangeset for help on using the changeset viewer.