Changeset cea5ff7 in rtems


Ignore:
Timestamp:
Oct 20, 2017, 1:35:14 PM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b13ec80
Parents:
7ed377b
git-author:
Sebastian Huber <sebastian.huber@…> (10/20/17 13:35:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/24/17 07:37:28)
Message:

score: Add _Watchdog_Nanoseconds_per_tick

Move it from the configuration to a separate variable.

Update #3117.
Update #3182.

Files:
4 edited

Legend:

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

    r7ed377b rcea5ff7  
    31093109    RTEMS_ARRAY_SIZE( _Thread_Control_add_ons );
    31103110
     3111  const uint32_t _Watchdog_Nanoseconds_per_tick =
     3112    1000 * CONFIGURE_MICROSECONDS_PER_TICK;
     3113
    31113114  const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND;
    31123115
     
    31683171    CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS,  /*   enabled */
    31693172    CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
    3170     1000 * CONFIGURE_MICROSECONDS_PER_TICK,   /* nanoseconds per clock tick */
    31713173    CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
    31723174    CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
  • cpukit/sapi/include/rtems/config.h

    r7ed377b rcea5ff7  
    4343#define rtems_resource_maximum_per_allocation(resource) \
    4444  _Objects_Maximum_per_allocation(resource)
     45
     46#include <rtems/score/watchdog.h>
    4547
    4648/*
     
    166168
    167169  /**
    168    * This field specifies the number of nanoseconds which elapse
    169    * between clock ticks.  This value is derived from the
    170    * microseconds_per_tick field and provided to avoid calculation at
    171    * run-time.
    172    */
    173   uint32_t                       nanoseconds_per_tick;
    174 
    175   /**
    176170   * This field specifies the number of ticks in each task's timeslice.
    177171   */
     
    309303        (Configuration.microseconds_per_tick / 1000)
    310304#define rtems_configuration_get_nanoseconds_per_tick() \
    311         (Configuration.nanoseconds_per_tick)
     305        (_Watchdog_Nanoseconds_per_tick)
    312306
    313307#define rtems_configuration_get_ticks_per_timeslice() \
  • cpukit/score/include/rtems/score/watchdog.h

    r7ed377b rcea5ff7  
    160160
    161161/**
     162 * @brief The watchdog nanoseconds per tick.
     163 *
     164 * This constant is defined by the application configuration via
     165 * <rtems/confdefs.h>.
     166 */
     167extern const uint32_t _Watchdog_Nanoseconds_per_tick;
     168
     169/**
    162170 * @brief The watchdog ticks per second.
    163171 *
  • testsuites/sptests/spwatchdog/init.c

    r7ed377b rcea5ff7  
    6060static void test_watchdog_config( void )
    6161{
     62  rtems_test_assert( _Watchdog_Nanoseconds_per_tick == 10000000 );
    6263  rtems_test_assert( _Watchdog_Ticks_per_second == 100 );
    6364  rtems_test_assert( _Watchdog_Monotonic_max_seconds == 184467440737095516 );
Note: See TracChangeset for help on using the changeset viewer.