summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
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
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')
-rw-r--r--cpukit/score/src/coretod.c20
-rw-r--r--cpukit/score/src/coretodadjust.c9
-rw-r--r--cpukit/score/src/coretodget.c46
-rw-r--r--cpukit/score/src/coretodgetuptimetimespec.c32
-rw-r--r--cpukit/score/src/coretodsecondssinceepoch.c32
-rw-r--r--cpukit/score/src/coretodset.c19
-rw-r--r--cpukit/score/src/coretodtickle.c22
-rw-r--r--cpukit/score/src/kern_tc.c6
-rw-r--r--cpukit/score/src/timespecgetasnanoseconds.c7
-rw-r--r--cpukit/score/src/ts64addto.c31
-rw-r--r--cpukit/score/src/ts64divide.c51
-rw-r--r--cpukit/score/src/ts64equalto.c31
-rw-r--r--cpukit/score/src/ts64getnanoseconds.c30
-rw-r--r--cpukit/score/src/ts64getseconds.c30
-rw-r--r--cpukit/score/src/ts64lessthan.c31
-rw-r--r--cpukit/score/src/ts64set.c33
-rw-r--r--cpukit/score/src/ts64settozero.c31
-rw-r--r--cpukit/score/src/ts64subtract.c31
-rw-r--r--cpukit/score/src/ts64totimespec.c32
-rw-r--r--cpukit/score/src/ts64totimeval.c37
-rw-r--r--cpukit/score/src/watchdogtick.c34
21 files changed, 64 insertions, 531 deletions
diff --git a/cpukit/score/src/coretod.c b/cpukit/score/src/coretod.c
index 2deeebaeb3..975ffefc7d 100644
--- a/cpukit/score/src/coretod.c
+++ b/cpukit/score/src/coretod.c
@@ -20,24 +20,16 @@
#include <rtems/score/todimpl.h>
-static uint32_t _TOD_Nanoseconds_since_tick_default_handler( void )
-{
- return 0;
-}
-
void _TOD_Handler_initialization(void)
{
- TOD_Control *tod = &_TOD;
-
- _ISR_lock_Initialize( &tod->lock, "TOD" );
-
- _Timestamp_Set( &tod->now, TOD_SECONDS_1970_THROUGH_1988, 0 );
+ struct timespec ts;
- _Timestamp_Set_to_zero( &tod->uptime );
+ _Timecounter_Initialize();
- tod->nanoseconds_since_last_tick =
- _TOD_Nanoseconds_since_tick_default_handler;
+ ts.tv_sec = TOD_SECONDS_1970_THROUGH_1988;
+ ts.tv_nsec = 0;
+ _Timecounter_Set_clock( &ts );
/* TOD has not been set */
- tod->is_set = false;
+ _TOD.is_set = false;
}
diff --git a/cpukit/score/src/coretodadjust.c b/cpukit/score/src/coretodadjust.c
index 09cf01ad7c..6097e207dc 100644
--- a/cpukit/score/src/coretodadjust.c
+++ b/cpukit/score/src/coretodadjust.c
@@ -25,8 +25,7 @@ void _TOD_Adjust(
const Timestamp_Control delta
)
{
- Timestamp_Control tod;
- Timestamp_Control *tod_ptr;
+ Timestamp_Control tod;
/*
* Currently, RTEMS does the adjustment in one movement.
@@ -41,11 +40,11 @@ void _TOD_Adjust(
*/
_Thread_Disable_dispatch();
- tod_ptr = _TOD_Get_with_nanoseconds( &tod, &_TOD.now );
+ _TOD_Get( &tod );
- _Timestamp_Add_to( tod_ptr, &delta );
+ _Timestamp_Add_to( &tod, &delta );
- _TOD_Set_with_timestamp( tod_ptr );
+ _TOD_Set_with_timestamp( &tod );
_Thread_Enable_dispatch();
}
diff --git a/cpukit/score/src/coretodget.c b/cpukit/score/src/coretodget.c
deleted file mode 100644
index 70eb238a09..0000000000
--- a/cpukit/score/src/coretodget.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file
- *
- * @brief Returns a Current TOD with Nanosecond Granularity
- * @ingroup ScoreTOD
- */
-
-/*
- * COPYRIGHT (c) 1989-2014.
- * 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/todimpl.h>
-#include <rtems/score/isrlevel.h>
-
-Timestamp_Control *_TOD_Get_with_nanoseconds(
- Timestamp_Control *snapshot,
- const Timestamp_Control *clock
-)
-{
- TOD_Control *tod = &_TOD;
- ISR_lock_Context lock_context;
- Timestamp_Control offset;
- Timestamp_Control now;
- uint32_t nanoseconds;
-
- _TOD_Acquire( tod, &lock_context );
- nanoseconds = ( *tod->nanoseconds_since_last_tick )();
- now = *clock;
- _TOD_Release( tod, &lock_context );
-
- _Timestamp_Set( &offset, 0, nanoseconds );
- _Timestamp_Add_to( &now, &offset );
-
- *snapshot = now;
-
- return snapshot;
-}
diff --git a/cpukit/score/src/coretodgetuptimetimespec.c b/cpukit/score/src/coretodgetuptimetimespec.c
deleted file mode 100644
index 5980b2f4bd..0000000000
--- a/cpukit/score/src/coretodgetuptimetimespec.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file
- *
- * @brief Get Uptime as struct timespec
- * @ingroup ScoreTOD
- */
-
-/*
- * COPYRIGHT (c) 1989-2014.
- * 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/todimpl.h>
-
-void _TOD_Get_uptime_as_timespec(
- struct timespec *uptime
-)
-{
- Timestamp_Control uptime_ts;
-
- /* assume time checked for NULL by caller */
- _TOD_Get_uptime( &uptime_ts );
- _Timestamp_To_timespec( &uptime_ts, uptime );
-}
diff --git a/cpukit/score/src/coretodsecondssinceepoch.c b/cpukit/score/src/coretodsecondssinceepoch.c
deleted file mode 100644
index b7bd2705c9..0000000000
--- a/cpukit/score/src/coretodsecondssinceepoch.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * 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/todimpl.h>
-
-uint32_t _TOD_Seconds_since_epoch( void )
-{
- TOD_Control *tod = &_TOD;
- ISR_lock_Context lock_context;
- Timestamp_Control now;
-
- _TOD_Acquire( tod, &lock_context );
- now = tod->now;
- _TOD_Release( tod, &lock_context );
-
- return _Timestamp_Get_seconds( &now );
-}
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
index 3d117589a1..3230179414 100644
--- a/cpukit/score/src/coretodset.c
+++ b/cpukit/score/src/coretodset.c
@@ -26,20 +26,21 @@ void _TOD_Set_with_timestamp(
const Timestamp_Control *tod_as_timestamp
)
{
- TOD_Control *tod = &_TOD;
- uint32_t nanoseconds = _Timestamp_Get_nanoseconds( tod_as_timestamp );
- Watchdog_Interval seconds_next = _Timestamp_Get_seconds( tod_as_timestamp );
+ struct timespec ts;
+ uint32_t nanoseconds;
+ Watchdog_Interval seconds_next;
Watchdog_Interval seconds_now;
- ISR_lock_Context lock_context;
Watchdog_Header *header;
+ _Timestamp_To_timespec( tod_as_timestamp, &ts );
+ nanoseconds = ts.tv_nsec;
+ seconds_next = ts.tv_sec;
+
_Thread_Disable_dispatch();
seconds_now = _TOD_Seconds_since_epoch();
- _TOD_Acquire( tod, &lock_context );
- tod->now = *tod_as_timestamp;
- _TOD_Release( tod, &lock_context );
+ _Timecounter_Set_clock( &ts );
header = &_Watchdog_Seconds_header;
@@ -48,8 +49,8 @@ void _TOD_Set_with_timestamp(
else
_Watchdog_Adjust_forward( header, seconds_next - seconds_now );
- tod->seconds_trigger = nanoseconds;
- tod->is_set = true;
+ _TOD.seconds_trigger = nanoseconds;
+ _TOD.is_set = true;
_Thread_Enable_dispatch();
}
diff --git a/cpukit/score/src/coretodtickle.c b/cpukit/score/src/coretodtickle.c
index 9116fc1a3b..3d7c71e1c1 100644
--- a/cpukit/score/src/coretodtickle.c
+++ b/cpukit/score/src/coretodtickle.c
@@ -24,30 +24,10 @@
void _TOD_Tickle_ticks( void )
{
- TOD_Control *tod = &_TOD;
- ISR_lock_Context lock_context;
- Timestamp_Control tick;
- uint32_t nanoseconds_per_tick;
-
- nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
-
- /* Convert the tick quantum to a timestamp */
- _Timestamp_Set( &tick, 0, nanoseconds_per_tick );
-
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
- _TOD_Acquire( tod, &lock_context );
-
- /* Update the uptime */
- _Timestamp_Add_to( &tod->uptime, &tick );
-
- /* Update the current TOD */
- _Timestamp_Add_to( &tod->now, &tick );
-
- _TOD_Release( tod, &lock_context );
-
- _TOD.seconds_trigger += nanoseconds_per_tick;
+ _TOD.seconds_trigger += rtems_configuration_get_nanoseconds_per_tick();
if ( _TOD.seconds_trigger >= 1000000000UL ) {
_TOD.seconds_trigger -= 1000000000UL;
_Watchdog_Tickle_seconds();
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index bca73ecb19..54799273b7 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -33,6 +33,7 @@
#define time_second _Timecounter_Time_second
#define time_uptime _Timecounter_Time_uptime
#include <rtems/score/timecounterimpl.h>
+#include <rtems/score/watchdogimpl.h>
#endif /* __rtems__ */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD r277406 2015-01-20T03:54:30Z$");
@@ -1886,6 +1887,9 @@ _Timecounter_Tick(void)
{
#endif /* __rtems__ */
tc_windup();
+#ifdef __rtems__
+ _Watchdog_Tick();
+#endif /* __rtems__ */
}
#ifdef __rtems__
void
@@ -1924,6 +1928,8 @@ _Timecounter_Tick_simple(uint32_t delta, uint32_t offset)
time_uptime = th->th_offset.sec;
_ISR_lock_Release_and_ISR_enable(&_Timecounter_Lock, &lock_context);
+
+ _Watchdog_Tick();
}
#endif /* __rtems__ */
diff --git a/cpukit/score/src/timespecgetasnanoseconds.c b/cpukit/score/src/timespecgetasnanoseconds.c
index 4ef1af4f62..2f8d17f4a4 100644
--- a/cpukit/score/src/timespecgetasnanoseconds.c
+++ b/cpukit/score/src/timespecgetasnanoseconds.c
@@ -20,10 +20,9 @@
#include <rtems/score/timespec.h>
#include <rtems/score/todimpl.h>
-uint64_t _Timespec_Get_As_nanoseconds(
- const struct timespec *time,
- const uint32_t nanoseconds
+uint64_t _Timespec_Get_as_nanoseconds(
+ const struct timespec *time
)
{
- return ( ((uint64_t) time->tv_sec) * 1000000000ULL ) + time->tv_nsec + nanoseconds;
+ return ( ((uint64_t) time->tv_sec) * 1000000000ULL ) + time->tv_nsec;
}
diff --git a/cpukit/score/src/ts64addto.c b/cpukit/score/src/ts64addto.c
deleted file mode 100644
index a0f4b3cf30..0000000000
--- a/cpukit/score/src/ts64addto.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file score/src/ts64addto.c
- *
- * @brief Add to a Timestamp
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_Add_to(
- Timestamp64_Control *_time,
- const Timestamp64_Control *_add
-)
-{
- _Timestamp64_implementation_Add_to( _time, _add );
-}
-#endif
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
diff --git a/cpukit/score/src/ts64equalto.c b/cpukit/score/src/ts64equalto.c
deleted file mode 100644
index fd07474762..0000000000
--- a/cpukit/score/src/ts64equalto.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @brief Timestamp equal to Operator
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-bool _Timestamp64_Equal_to(
- const Timestamp64_Control *_lhs,
- const Timestamp64_Control *_rhs
-)
-{
- return _Timestamp64_implementation_Equal_to( _lhs, _rhs );
-}
-#endif
diff --git a/cpukit/score/src/ts64getnanoseconds.c b/cpukit/score/src/ts64getnanoseconds.c
deleted file mode 100644
index a5da43b1f1..0000000000
--- a/cpukit/score/src/ts64getnanoseconds.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file score/src/ts64toticks.c
- *
- * @brief Get Nanoseconds Portion of Timestamp
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-uint32_t _Timestamp64_Get_nanoseconds(
- const Timestamp64_Control *_time
-)
-{
- return _Timestamp64_implementation_Get_nanoseconds( _time );
-}
-#endif
diff --git a/cpukit/score/src/ts64getseconds.c b/cpukit/score/src/ts64getseconds.c
deleted file mode 100644
index eca0536e0e..0000000000
--- a/cpukit/score/src/ts64getseconds.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file
- *
- * @brief Get Seconds Portion of Timestamp
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-uint32_t _Timestamp64_Get_seconds(
- const Timestamp64_Control *_time
-)
-{
- return _Timestamp64_implementation_Get_seconds( _time );
-}
-#endif
diff --git a/cpukit/score/src/ts64lessthan.c b/cpukit/score/src/ts64lessthan.c
deleted file mode 100644
index d1478147dc..0000000000
--- a/cpukit/score/src/ts64lessthan.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @brief Timestamp Less Than Operator
- * @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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-bool _Timestamp64_Less_than(
- const Timestamp64_Control *_lhs,
- const Timestamp64_Control *_rhs
-)
-{
- return _Timestamp64_implementation_Less_than( _lhs, _rhs );
-}
-#endif
diff --git a/cpukit/score/src/ts64set.c b/cpukit/score/src/ts64set.c
deleted file mode 100644
index 22771d6980..0000000000
--- a/cpukit/score/src/ts64set.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file
- *
- * @brief Set Timestamp to Specified Seconds and Nanoseconds
- *
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_Set(
- Timestamp64_Control *_time,
- Timestamp64_Control _seconds,
- Timestamp64_Control _nanoseconds
-)
-{
- _Timestamp64_implementation_Set( _time, _seconds, _nanoseconds );
-}
-#endif
diff --git a/cpukit/score/src/ts64settozero.c b/cpukit/score/src/ts64settozero.c
deleted file mode 100644
index 7b319df1cf..0000000000
--- a/cpukit/score/src/ts64settozero.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @brief Zero a Timestamp64 Instance
- *
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_Set_to_zero(
- Timestamp64_Control *_time
-)
-{
- _Timestamp64_implementation_Set_to_zero( _time );
-}
-#endif
diff --git a/cpukit/score/src/ts64subtract.c b/cpukit/score/src/ts64subtract.c
deleted file mode 100644
index 1ee917bb2e..0000000000
--- a/cpukit/score/src/ts64subtract.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @brief Subtract Two Timestamps
- * @ingroup Timestamp
- */
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_Subtract(
- const Timestamp64_Control *_start,
- const Timestamp64_Control *_end,
- Timestamp64_Control *_result
-)
-{
- _Timestamp64_implementation_Subtract( _start, _end, _result );
-}
-#endif
diff --git a/cpukit/score/src/ts64totimespec.c b/cpukit/score/src/ts64totimespec.c
deleted file mode 100644
index 7e81da74e3..0000000000
--- a/cpukit/score/src/ts64totimespec.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file
- *
- * @brief Convert Timestamp to Struct Timespec
- *
- * @ingroup SuperCore
- */
-
-/*
- * 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 <rtems/score/timestamp.h>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_To_timespec(
- const Timestamp64_Control *_timestamp,
- struct timespec *_timespec
-)
-{
- _Timestamp64_implementation_To_timespec( _timestamp, _timespec );
-}
-#endif
diff --git a/cpukit/score/src/ts64totimeval.c b/cpukit/score/src/ts64totimeval.c
deleted file mode 100644
index 1ac765b1ff..0000000000
--- a/cpukit/score/src/ts64totimeval.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file
- *
- * @brief Convert 64-bit Timestamp to struct timeval
- *
- * @ingroup SuperCore
- */
-
-/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * 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>
-
-#if CPU_TIMESTAMP_USE_INT64 == TRUE
-void _Timestamp64_To_timeval(
- const Timestamp64_Control *_timestamp,
- struct timeval *_timeval
-)
-{
- _Timestamp64_implementation_To_timeval( _timestamp, _timeval );
-}
-#endif
diff --git a/cpukit/score/src/watchdogtick.c b/cpukit/score/src/watchdogtick.c
new file mode 100644
index 0000000000..b9bc3f7a9c
--- /dev/null
+++ b/cpukit/score/src/watchdogtick.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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.
+ */
+
+#include <rtems/score/schedulerimpl.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/todimpl.h>
+#include <rtems/score/watchdogimpl.h>
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+void _Watchdog_Tick( void )
+{
+ _TOD_Tickle_ticks();
+
+ _Watchdog_Tickle_ticks();
+
+ _Scheduler_Tick();
+
+ if ( _Thread_Dispatch_is_enabled() )
+ _Thread_Dispatch();
+}