Changeset bf2a53d2 in rtems


Ignore:
Timestamp:
Oct 14, 2017, 1:14:53 PM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
91ce012c
Parents:
f4009d8
git-author:
Sebastian Huber <sebastian.huber@…> (10/14/17 13:14:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/17/17 06:15:40)
Message:

score: Rename watchdog variants

Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to
highlight the corresponding POSIX CLOCK_MONOTONIC.

Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to
highlight the corresponding POSIX CLOCK_REALTIME.

Update #3117.
Update #3182.

Files:
23 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/pthreadimpl.h

    rf4009d8 rbf2a53d2  
    5757    _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
    5858
    59   _Watchdog_Per_CPU_insert_relative(
     59  _Watchdog_Per_CPU_insert_monotonic(
    6060    &api->Sporadic.Timer,
    6161    _Per_CPU_Get(),
  • cpukit/posix/src/alarm.c

    rf4009d8 rbf2a53d2  
    7878
    7979  remaining = (unsigned long) _Watchdog_Cancel(
    80     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     80    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    8181    the_watchdog,
    8282    now
     
    8585  if ( ticks != 0 ) {
    8686    _Watchdog_Insert(
    87       &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     87      &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    8888      the_watchdog,
    8989      now + ticks
  • cpukit/posix/src/pthread.c

    rf4009d8 rbf2a53d2  
    7070  }
    7171
    72   _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
     72  _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
    7373  _POSIX_Threads_Sporadic_timer_insert( the_thread, api );
    7474
     
    166166
    167167  if ( api->schedpolicy == SCHED_SPORADIC ) {
    168     _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
     168    _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
    169169  }
    170170
  • cpukit/posix/src/pthreadsetschedparam.c

    rf4009d8 rbf2a53d2  
    7070  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    7171
    72   _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
     72  _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
    7373
    7474  _Priority_Node_set_priority( &the_thread->Real_priority, core_normal_prio );
  • cpukit/posix/src/timerdelete.c

    rf4009d8 rbf2a53d2  
    5757    ptimer->state = POSIX_TIMER_STATE_FREE;
    5858    _Watchdog_Remove(
    59       &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     59      &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    6060      &ptimer->Timer
    6161    );
  • cpukit/posix/src/timersettime.c

    rf4009d8 rbf2a53d2  
    4343
    4444  _Watchdog_Insert(
    45     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     45    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    4646    &ptimer->Timer,
    4747    cpu->Watchdog.ticks + ticks
     
    153153    /* Stop the timer */
    154154    _Watchdog_Remove(
    155       &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     155      &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    156156      &ptimer->Timer
    157157    );
  • cpukit/posix/src/ualarm.c

    rf4009d8 rbf2a53d2  
    5656   */
    5757  if ( _POSIX_signals_Ualarm_interval != 0 ) {
    58     _Watchdog_Per_CPU_insert_relative(
     58    _Watchdog_Per_CPU_insert_monotonic(
    5959      the_watchdog,
    6060      _Per_CPU_Get(),
     
    108108
    109109  remaining = (useconds_t) _Watchdog_Cancel(
    110     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     110    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    111111    the_watchdog,
    112112    now
     
    119119    _Watchdog_Set_CPU( the_watchdog, cpu );
    120120    _Watchdog_Insert(
    121       &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     121      &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    122122      the_watchdog,
    123123      now + ticks_initial
  • cpukit/rtems/src/eventseize.c

    rf4009d8 rbf2a53d2  
    8282
    8383  if ( ticks ) {
    84     _Thread_Timer_insert_relative(
     84    _Thread_Timer_insert_monotonic(
    8585      executing,
    8686      cpu_self,
  • cpukit/rtems/src/ratemoncancel.c

    rf4009d8 rbf2a53d2  
    3333  _Rate_monotonic_Acquire_critical( the_period, lock_context );
    3434
    35   _Watchdog_Per_CPU_remove_relative( &the_period->Timer );
     35  _Watchdog_Per_CPU_remove_monotonic( &the_period->Timer );
    3636  the_period->state = RATE_MONOTONIC_INACTIVE;
    3737  _Scheduler_Cancel_job(
  • cpukit/rtems/src/ratemonperiod.c

    rf4009d8 rbf2a53d2  
    102102  cpu_self = _Thread_Dispatch_disable_critical( lock_context );
    103103
    104   deadline = _Watchdog_Per_CPU_insert_relative(
     104  deadline = _Watchdog_Per_CPU_insert_monotonic(
    105105    &the_period->Timer,
    106106    cpu_self,
  • cpukit/rtems/src/ratemontimeout.c

    rf4009d8 rbf2a53d2  
    3737  the_period->state = RATE_MONOTONIC_EXPIRED;
    3838
    39   deadline = _Watchdog_Per_CPU_insert_relative(
     39  deadline = _Watchdog_Per_CPU_insert_monotonic(
    4040    &the_period->Timer,
    4141    _Per_CPU_Get(),
  • cpukit/rtems/src/taskwakeafter.c

    rf4009d8 rbf2a53d2  
    4242      _Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
    4343      _Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
    44       _Thread_Timer_insert_relative(
     44      _Thread_Timer_insert_monotonic(
    4545        executing,
    4646        cpu_self,
  • cpukit/rtems/src/taskwakewhen.c

    rf4009d8 rbf2a53d2  
    5353    _Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
    5454    _Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
    55     _Thread_Timer_insert_absolute(
     55    _Thread_Timer_insert_realtime(
    5656      executing,
    5757      cpu_self,
  • cpukit/rtems/src/timercreate.c

    rf4009d8 rbf2a53d2  
    3030
    3131RTEMS_STATIC_ASSERT(
    32   PER_CPU_WATCHDOG_ABSOLUTE == TIMER_CLASS_BIT_TIME_OF_DAY,
     32  PER_CPU_WATCHDOG_REALTIME == TIMER_CLASS_BIT_TIME_OF_DAY,
    3333  TIMER_CLASS_BIT_TIME_OF_DAY
    3434);
     
    7373    if ( _Timer_Is_interval_class( the_class ) ) {
    7474      _Watchdog_Insert(
    75         &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     75        &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    7676        &the_timer->Ticker,
    7777        cpu->Watchdog.ticks + interval
     
    7979    } else {
    8080      _Watchdog_Insert(
    81         &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ],
     81        &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ],
    8282        &the_timer->Ticker,
    8383        _Watchdog_Ticks_from_seconds( interval )
  • cpukit/rtems/src/timerreset.c

    rf4009d8 rbf2a53d2  
    3838      _Timer_Cancel( cpu, the_timer );
    3939      _Watchdog_Insert(
    40         &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     40        &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    4141        &the_timer->Ticker,
    4242        cpu->Watchdog.ticks + the_timer->initial
  • cpukit/score/include/rtems/score/percpu.h

    rf4009d8 rbf2a53d2  
    249249typedef enum {
    250250  /**
    251    * @brief Index for relative per-CPU watchdog header.
    252    *
    253    * The reference time point for this header is current ticks value
    254    * during insert.  Time is measured in clock ticks.
    255    */
    256   PER_CPU_WATCHDOG_RELATIVE,
    257 
    258   /**
    259    * @brief Index for absolute per-CPU watchdog header.
    260    *
    261    * The reference time point for this header is the POSIX Epoch.  Time is
    262    * measured in nanoseconds since POSIX Epoch.
    263    */
    264   PER_CPU_WATCHDOG_ABSOLUTE,
     251   * @brief Index for monotonic clock per-CPU watchdog header.
     252   *
     253   * The reference time point for the monotonic clock is the system start.  The
     254   * clock resolution is one system clock tick.  It is used for the system
     255   * clock tick based time services and the POSIX services using
     256   * CLOCK_MONOTONIC.
     257   */
     258  PER_CPU_WATCHDOG_MONOTONIC,
     259
     260  /**
     261   * @brief Index for realtime clock per-CPU watchdog header.
     262   *
     263   * The reference time point for the realtime clock is the POSIX Epoch.  The
     264   * clock resolution is one nanosecond.  It is used for the time of day
     265   * services and the POSIX services using CLOCK_REALTIME.
     266   */
     267  PER_CPU_WATCHDOG_REALTIME,
    265268
    266269  /**
     
    396399
    397400    /**
    398      * @brief Watchdog ticks on this processor used for relative watchdogs.
     401     * @brief Watchdog ticks on this processor used for monotonic clock
     402     * watchdogs.
    399403     */
    400404    uint64_t ticks;
  • cpukit/score/include/rtems/score/threadimpl.h

    rf4009d8 rbf2a53d2  
    18541854{
    18551855  _ISR_lock_Initialize( &timer->Lock, "Thread Timer" );
    1856   timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
     1856  timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
    18571857  _Watchdog_Preinitialize( &timer->Watchdog, cpu );
    18581858}
    18591859
    1860 RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_relative(
     1860RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_monotonic(
    18611861  Thread_Control                 *the_thread,
    18621862  Per_CPU_Control                *cpu,
     
    18701870
    18711871  the_thread->Timer.header =
    1872     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
     1872    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
    18731873  the_thread->Timer.Watchdog.routine = routine;
    1874   _Watchdog_Per_CPU_insert_relative( &the_thread->Timer.Watchdog, cpu, ticks );
     1874  _Watchdog_Per_CPU_insert_monotonic( &the_thread->Timer.Watchdog, cpu, ticks );
    18751875
    18761876  _ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context );
    18771877}
    18781878
    1879 RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_absolute(
     1879RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_realtime(
    18801880  Thread_Control                 *the_thread,
    18811881  Per_CPU_Control                *cpu,
     
    18891889
    18901890  the_thread->Timer.header =
    1891     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
     1891    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
    18921892  the_thread->Timer.Watchdog.routine = routine;
    1893   _Watchdog_Per_CPU_insert_absolute( &the_thread->Timer.Watchdog, cpu, expire );
     1893  _Watchdog_Per_CPU_insert_realtime( &the_thread->Timer.Watchdog, cpu, expire );
    18941894
    18951895  _ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context );
  • cpukit/score/include/rtems/score/watchdogimpl.h

    rf4009d8 rbf2a53d2  
    352352}
    353353
    354 RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
     354RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_monotonic(
    355355  Watchdog_Control  *the_watchdog,
    356356  Per_CPU_Control   *cpu,
     
    362362  uint64_t          expire;
    363363
    364   header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
     364  header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
    365365
    366366  _Watchdog_Set_CPU( the_watchdog, cpu );
     
    373373}
    374374
    375 RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_absolute(
     375RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_realtime(
    376376  Watchdog_Control *the_watchdog,
    377377  Per_CPU_Control  *cpu,
     
    382382  Watchdog_Header  *header;
    383383
    384   header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
     384  header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
    385385
    386386  _Watchdog_Set_CPU( the_watchdog, cpu );
     
    408408}
    409409
    410 RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_relative(
     410RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_monotonic(
    411411  Watchdog_Control *the_watchdog
    412412)
     
    418418    the_watchdog,
    419419    cpu,
    420     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]
     420    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ]
    421421  );
    422422}
    423423
    424 RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_absolute(
     424RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_realtime(
    425425  Watchdog_Control *the_watchdog
    426426)
     
    432432    the_watchdog,
    433433    cpu,
    434     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ]
     434    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ]
    435435  );
    436436}
    437437
    438 RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_tickle_absolute(
     438RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_tickle_realtime(
    439439  Per_CPU_Control *cpu,
    440440  uint64_t         now
     
    445445  _ISR_lock_ISR_disable_and_acquire( &cpu->Watchdog.Lock, &lock_context );
    446446  _Watchdog_Tickle(
    447     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ],
     447    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ],
    448448    now,
    449449    &cpu->Watchdog.Lock,
  • cpukit/score/src/coretodset.c

    rf4009d8 rbf2a53d2  
    4444    Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
    4545
    46     _Watchdog_Per_CPU_tickle_absolute( cpu, tod_as_ticks );
     46    _Watchdog_Per_CPU_tickle_realtime( cpu, tod_as_ticks );
    4747  }
    4848
  • cpukit/score/src/threadqenqueue.c

    rf4009d8 rbf2a53d2  
    386386      /* A relative timeout of 0 is a special case indefinite (no) timeout */
    387387      if ( queue_context->timeout != 0 ) {
    388         _Thread_Timer_insert_relative(
     388        _Thread_Timer_insert_monotonic(
    389389          the_thread,
    390390          cpu_self,
     
    395395      break;
    396396    case WATCHDOG_ABSOLUTE:
    397       _Thread_Timer_insert_absolute(
     397      _Thread_Timer_insert_realtime(
    398398        the_thread,
    399399        cpu_self,
  • cpukit/score/src/watchdogtick.c

    rf4009d8 rbf2a53d2  
    7777
    7878  _Watchdog_Tickle(
    79     &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
     79    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
    8080    ticks,
    8181    &cpu->Watchdog.Lock,
     
    8484
    8585  _Timecounter_Getnanotime( &now );
    86   _Watchdog_Per_CPU_tickle_absolute(
     86  _Watchdog_Per_CPU_tickle_realtime(
    8787    cpu,
    8888    _Watchdog_Ticks_from_timespec( &now )
  • testsuites/sptests/spintrcritical08/init.c

    rf4009d8 rbf2a53d2  
    4646{
    4747  Per_CPU_Control *cpu = _Per_CPU_Get();
    48   Watchdog_Header *header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
     48  Watchdog_Header *header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
    4949  Watchdog_Control *watchdog = (Watchdog_Control *) header->first;
    5050
     
    5656    Thread_Wait_flags flags = _Thread_Wait_flags_get( thread );
    5757
    58     _Watchdog_Per_CPU_remove_relative( watchdog );
     58    _Watchdog_Per_CPU_remove_monotonic( watchdog );
    5959
    6060    rtems_test_assert( getState() == RATE_MONOTONIC_ACTIVE );
  • testsuites/sptests/spintrcritical09/init.c

    rf4009d8 rbf2a53d2  
    4040{
    4141  Per_CPU_Control *cpu_self = _Per_CPU_Get();
    42   Watchdog_Header *header = &cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
     42  Watchdog_Header *header = &cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
    4343  Watchdog_Control *watchdog = (Watchdog_Control *) header->first;
    4444
Note: See TracChangeset for help on using the changeset viewer.