summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/kern_tc.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/kern_tc.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/kern_tc.c')
-rw-r--r--cpukit/score/src/kern_tc.c6
1 files changed, 6 insertions, 0 deletions
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__ */