score: Rename _Watchdog_Ticks_from_*()

Rename _Watchdog_Ticks_from_*() to _Watchdog_Realtime_from_*().

This highlights that these routines are used for the CLOCK_REALTIME
watchdogs (in contrast to CLOCK_MONOTONIC).

Update #3117.
Update #3182.
This commit is contained in:
Sebastian Huber
2017-10-17 16:19:03 +02:00
parent 381ef5c833
commit ecef369875
6 changed files with 9 additions and 9 deletions

View File

@@ -152,7 +152,7 @@ int nanosleep(
if ( err != 0 ) if ( err != 0 )
return -1; return -1;
_Timespec_Add_to( &now, rqtp ); _Timespec_Add_to( &now, rqtp );
ticks = _Watchdog_Ticks_from_timespec( &now ); ticks = _Watchdog_Realtime_from_timespec( &now );
err = nanosleep_helper( CLOCK_REALTIME, err = nanosleep_helper( CLOCK_REALTIME,
ticks, ticks,
&now, &now,
@@ -209,7 +209,7 @@ int clock_nanosleep(
_Timespec_Add_to( &timeout, rqtp ); _Timespec_Add_to( &timeout, rqtp );
if ( clock_id == CLOCK_REALTIME ) { if ( clock_id == CLOCK_REALTIME ) {
ticks = _Watchdog_Ticks_from_timespec( &timeout ); ticks = _Watchdog_Realtime_from_timespec( &timeout );
err = nanosleep_helper( err = nanosleep_helper(
clock_id, clock_id,
ticks, ticks,

View File

@@ -56,7 +56,7 @@ rtems_status_code rtems_task_wake_when(
executing, executing,
cpu_self, cpu_self,
_Thread_Timeout, _Thread_Timeout,
_Watchdog_Ticks_from_seconds( seconds ) _Watchdog_Realtime_from_seconds( seconds )
); );
_Thread_Dispatch_enable( cpu_self ); _Thread_Dispatch_enable( cpu_self );
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;

View File

@@ -80,7 +80,7 @@ rtems_status_code _Timer_Fire(
_Watchdog_Insert( _Watchdog_Insert(
&cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ], &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ],
&the_timer->Ticker, &the_timer->Ticker,
_Watchdog_Ticks_from_seconds( interval ) _Watchdog_Realtime_from_seconds( interval )
); );
} }

View File

@@ -293,7 +293,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Next_first(
*/ */
#define WATCHDOG_BITS_FOR_1E9_NANOSECONDS 30 #define WATCHDOG_BITS_FOR_1E9_NANOSECONDS 30
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_seconds( RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Realtime_from_seconds(
uint32_t seconds uint32_t seconds
) )
{ {
@@ -304,7 +304,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_seconds(
return ticks; return ticks;
} }
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec( RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Realtime_from_timespec(
const struct timespec *ts const struct timespec *ts
) )
{ {
@@ -324,7 +324,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec(
return ticks; return ticks;
} }
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_sbintime( RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Realtime_from_sbintime(
sbintime_t sbt sbintime_t sbt
) )
{ {

View File

@@ -37,7 +37,7 @@ void _TOD_Set(
timespec2bintime( tod, &tod_as_bintime ); timespec2bintime( tod, &tod_as_bintime );
_Timecounter_Set_clock( &tod_as_bintime, lock_context ); _Timecounter_Set_clock( &tod_as_bintime, lock_context );
tod_as_ticks = _Watchdog_Ticks_from_timespec( tod ); tod_as_ticks = _Watchdog_Realtime_from_timespec( tod );
cpu_count = _SMP_Get_processor_count(); cpu_count = _SMP_Get_processor_count();
for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) { for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {

View File

@@ -85,7 +85,7 @@ void _Watchdog_Tick( Per_CPU_Control *cpu )
_Timecounter_Getnanotime( &now ); _Timecounter_Getnanotime( &now );
_Watchdog_Per_CPU_tickle_realtime( _Watchdog_Per_CPU_tickle_realtime(
cpu, cpu,
_Watchdog_Ticks_from_timespec( &now ) _Watchdog_Realtime_from_timespec( &now )
); );
_Scheduler_Tick( cpu ); _Scheduler_Tick( cpu );