From c380316710ad67e695cecd170125248c726731b9 Mon Sep 17 00:00:00 2001 From: Alexander Krutwig Date: Fri, 20 Mar 2015 08:28:20 +0100 Subject: score: Delete unused _Timestamp_(To|From)_ticks() --- cpukit/score/Makefile.am | 2 +- cpukit/score/include/rtems/score/timestamp.h | 35 ----------------------- cpukit/score/include/rtems/score/timestamp64.h | 28 ------------------ cpukit/score/src/ts64toticks.c | 39 -------------------------- 4 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 cpukit/score/src/ts64toticks.c (limited to 'cpukit/score') diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index e7d0181c75..ad2b3048e8 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -315,7 +315,7 @@ libscore_a_SOURCES += src/ts64addto.c \ src/ts64getnanoseconds.c src/ts64getseconds.c \ src/ts64lessthan.c \ src/ts64set.c src/ts64settozero.c src/ts64subtract.c \ - src/ts64toticks.c src/ts64totimespec.c src/ts64totimeval.c + src/ts64totimespec.c src/ts64totimeval.c ## TOD_C_FILES libscore_a_SOURCES += src/coretod.c src/coretodset.c src/coretodget.c \ diff --git a/cpukit/score/include/rtems/score/timestamp.h b/cpukit/score/include/rtems/score/timestamp.h index d03dbc0c45..dbd0425ff8 100644 --- a/cpukit/score/include/rtems/score/timestamp.h +++ b/cpukit/score/include/rtems/score/timestamp.h @@ -179,41 +179,6 @@ extern "C" { _Timestamp64_Add_to( _time, _add ) #endif -/** - * @brief Convert timestamp to number of clock ticks. - * - * This routine convert the @a time timestamp to the corresponding number - * of clock ticks. - * - * @param[in] _time points to the time to be converted - * - * @retval This method returns the number of ticks computed. - */ -#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE - #define _Timestamp_To_ticks( _time ) \ - _Timespec_To_ticks( _time ) -#else - #define _Timestamp_To_ticks( _time ) \ - _Timestamp64_To_ticks( _time ) -#endif - -/** - * @brief Converts the @a _ticks value to timestamp format. - * - * This routine converts the @a _ticks value to the corresponding - * timestamp format @a _time. - * - * @param[in] _time points to the timestamp format time result - * @param[in] _ticks points to the number of ticks to be filled in - */ -#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE - #define _Timestamp_From_ticks( _ticks, _time ) \ - _Timespec_From_ticks( _ticks, _time ) -#else - #define _Timestamp_From_ticks( _ticks, _time ) \ - _Timestamp64_From_ticks( _ticks, _time ) -#endif - /** * @brief Subtracts two timestamps. * diff --git a/cpukit/score/include/rtems/score/timestamp64.h b/cpukit/score/include/rtems/score/timestamp64.h index 29e429788e..39b4965a8c 100644 --- a/cpukit/score/include/rtems/score/timestamp64.h +++ b/cpukit/score/include/rtems/score/timestamp64.h @@ -196,34 +196,6 @@ static inline void _Timestamp64_implementation_Add_to( ); #endif -/** - * @brief Convert 64-bit timestamp to number of ticks. - * - * This routine convert the @a time timestamp to the corresponding number - * of clock ticks. - * - * @param[in] _time points to the time to be converted - * - * @retval This method returns the number of ticks computed. - */ -uint32_t _Timestamp64_To_ticks( - const Timestamp64_Control *_time -); - -/** - * @brief Convert ticks to 64-bit timestamp. - * - * This routine converts the @a _ticks value to the corresponding - * timestamp format @a _time. - * - * @param[in] _time points to the timestamp format time result - * @param[out] _ticks points to the number of ticks to be filled in - */ -void _Timestamp64_From_ticks( - uint32_t _ticks, - Timestamp64_Control *_time -); - static inline void _Timestamp64_implementation_Subtract( const Timestamp64_Control *_start, const Timestamp64_Control *_end, diff --git a/cpukit/score/src/ts64toticks.c b/cpukit/score/src/ts64toticks.c deleted file mode 100644 index a9a3c281c9..0000000000 --- a/cpukit/score/src/ts64toticks.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file - * - * @brief Convert 64-bit Timestamp to Number of Ticks - * @ingroup SuperCore Timestamp64 - */ - -/* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include -#include -#include - -#if CPU_TIMESTAMP_USE_INT64 == TRUE -uint32_t _Timestamp64_To_ticks( - const Timestamp64_Control *time -) -{ - uint32_t ticks; - - ticks = *time / rtems_configuration_get_nanoseconds_per_tick(); - if ( ticks ) - return ticks; - return 1; -} -#endif -- cgit v1.2.3