summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coretod.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/coretod.c')
-rw-r--r--cpukit/score/src/coretod.c20
1 files changed, 6 insertions, 14 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;
}