summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/ts64divide.c
diff options
context:
space:
mode:
authorAlexander Krutwig <alexander.krutwig@embedded-brains.de>2015-05-12 14:32:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-20 08:40:33 +0200
commit7cd2484c4cf9fc759b7205ed6d8adcc6d2c28ff6 (patch)
treedd60b6032354124d97233e7070506f09d1566832 /cpukit/score/src/ts64divide.c
parenttimecounter: Port to RTEMS (diff)
downloadrtems-7cd2484c4cf9fc759b7205ed6d8adcc6d2c28ff6.tar.bz2
timecounter: Use in RTEMS
Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
Diffstat (limited to 'cpukit/score/src/ts64divide.c')
-rw-r--r--cpukit/score/src/ts64divide.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/cpukit/score/src/ts64divide.c b/cpukit/score/src/ts64divide.c
deleted file mode 100644
index d9a5099892..0000000000
--- a/cpukit/score/src/ts64divide.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file
- *
- * @brief Divide Timestamp
- * @ingroup SuperCore
- */
-
-/*
- * COPYRIGHT (c) 1989-2007.
- * 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 <rtems/score/timestamp.h>
-
-/* This method is never inlined. */
-#if CPU_TIMESTAMP_USE_INT64 == TRUE || CPU_TIMESTAMP_USE_INT64_INLINE == TRUE
-void _Timestamp64_Divide(
- const Timestamp64_Control *_lhs,
- const Timestamp64_Control *_rhs,
- uint32_t *_ival_percentage,
- uint32_t *_fval_percentage
-)
-{
- Timestamp64_Control answer;
-
- if ( *_rhs == 0 ) {
- *_ival_percentage = 0;
- *_fval_percentage = 0;
- return;
- }
-
- /*
- * This looks odd but gives the results the proper precision.
- *
- * TODO: Rounding on the last digit of the fval.
- */
-
- answer = (*_lhs * 100000) / *_rhs;
-
- *_ival_percentage = answer / 1000;
- *_fval_percentage = answer % 1000;
-}
-#endif