[PATCH] score: Delete unused _Timestamp_(To|From)_ticks()
Alexander Krutwig
alexander.krutwig at embedded-brains.de
Fri Mar 20 07:28:20 UTC 2015
---
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
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 509a243..f84b126 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -315,7 +315,7 @@ libscore_a_SOURCES += src/ts64addto.c src/ts64dividebyinteger.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 5c23979..421d69a 100644
--- a/cpukit/score/include/rtems/score/timestamp.h
+++ b/cpukit/score/include/rtems/score/timestamp.h
@@ -180,41 +180,6 @@ extern "C" {
#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.
*
* This routine subtracts two timestamps. @a result is set to
diff --git a/cpukit/score/include/rtems/score/timestamp64.h b/cpukit/score/include/rtems/score/timestamp64.h
index 3d40ca2..a9503b1 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 a9a3c28..0000000
--- 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 <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/timestamp.h>
-
-#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
--
1.8.4.5
More information about the devel
mailing list