From ecef36987538fe7daf033c0c9344413355d615b1 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 Oct 2017 16:19:03 +0200 Subject: 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. --- cpukit/posix/src/nanosleep.c | 4 ++-- cpukit/rtems/src/taskwakewhen.c | 2 +- cpukit/rtems/src/timercreate.c | 2 +- cpukit/score/include/rtems/score/watchdogimpl.h | 6 +++--- cpukit/score/src/coretodset.c | 2 +- cpukit/score/src/watchdogtick.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index 13f4536f6e..b2c169373a 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -152,7 +152,7 @@ int nanosleep( if ( err != 0 ) return -1; _Timespec_Add_to( &now, rqtp ); - ticks = _Watchdog_Ticks_from_timespec( &now ); + ticks = _Watchdog_Realtime_from_timespec( &now ); err = nanosleep_helper( CLOCK_REALTIME, ticks, &now, @@ -209,7 +209,7 @@ int clock_nanosleep( _Timespec_Add_to( &timeout, rqtp ); if ( clock_id == CLOCK_REALTIME ) { - ticks = _Watchdog_Ticks_from_timespec( &timeout ); + ticks = _Watchdog_Realtime_from_timespec( &timeout ); err = nanosleep_helper( clock_id, ticks, diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c index ac92ea875e..228dd98052 100644 --- a/cpukit/rtems/src/taskwakewhen.c +++ b/cpukit/rtems/src/taskwakewhen.c @@ -56,7 +56,7 @@ rtems_status_code rtems_task_wake_when( executing, cpu_self, _Thread_Timeout, - _Watchdog_Ticks_from_seconds( seconds ) + _Watchdog_Realtime_from_seconds( seconds ) ); _Thread_Dispatch_enable( cpu_self ); return RTEMS_SUCCESSFUL; diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c index 444b07cfa5..42492c2f67 100644 --- a/cpukit/rtems/src/timercreate.c +++ b/cpukit/rtems/src/timercreate.c @@ -80,7 +80,7 @@ rtems_status_code _Timer_Fire( _Watchdog_Insert( &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ], &the_timer->Ticker, - _Watchdog_Ticks_from_seconds( interval ) + _Watchdog_Realtime_from_seconds( interval ) ); } diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h index 89a7e7d602..f1693a3a14 100644 --- a/cpukit/score/include/rtems/score/watchdogimpl.h +++ b/cpukit/score/include/rtems/score/watchdogimpl.h @@ -293,7 +293,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Next_first( */ #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 ) { @@ -304,7 +304,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_seconds( return ticks; } -RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec( +RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Realtime_from_timespec( const struct timespec *ts ) { @@ -324,7 +324,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec( return ticks; } -RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_sbintime( +RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Realtime_from_sbintime( sbintime_t sbt ) { diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c index beda8c69b8..1223f5c7aa 100644 --- a/cpukit/score/src/coretodset.c +++ b/cpukit/score/src/coretodset.c @@ -37,7 +37,7 @@ void _TOD_Set( timespec2bintime( tod, &tod_as_bintime ); _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(); for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) { diff --git a/cpukit/score/src/watchdogtick.c b/cpukit/score/src/watchdogtick.c index e1c5a30f8a..3384ea60f3 100644 --- a/cpukit/score/src/watchdogtick.c +++ b/cpukit/score/src/watchdogtick.c @@ -85,7 +85,7 @@ void _Watchdog_Tick( Per_CPU_Control *cpu ) _Timecounter_Getnanotime( &now ); _Watchdog_Per_CPU_tickle_realtime( cpu, - _Watchdog_Ticks_from_timespec( &now ) + _Watchdog_Realtime_from_timespec( &now ) ); _Scheduler_Tick( cpu ); -- cgit v1.2.3