summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coretodset.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-06 15:30:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-09 08:30:03 +0200
commit2256946e9c0bc452004521d7aeeb68b72f680f42 (patch)
tree1a46bee10c6e92482125405b902ab75bfd8fd5e9 /cpukit/score/src/coretodset.c
parentscore: Simplify _Timestamp_Add_to() (diff)
downloadrtems-2256946e9c0bc452004521d7aeeb68b72f680f42.tar.bz2
score: Use struct timespec for TOD
Use the timestamps only for uptime based values. Use struct timespec for the absolute time values (TOD). Update #2740.
Diffstat (limited to 'cpukit/score/src/coretodset.c')
-rw-r--r--cpukit/score/src/coretodset.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
index f1d2e36eb0..80b0b762bd 100644
--- a/cpukit/score/src/coretodset.c
+++ b/cpukit/score/src/coretodset.c
@@ -23,21 +23,21 @@
#include <rtems/score/watchdogimpl.h>
void _TOD_Set(
- const Timestamp_Control *tod_as_timestamp,
- ISR_lock_Context *lock_context
+ const struct timespec *tod,
+ ISR_lock_Context *lock_context
)
{
- struct timespec tod_as_timespec;
+ struct bintime tod_as_bintime;
uint64_t tod_as_ticks;
uint32_t cpu_count;
uint32_t cpu_index;
_Assert( _API_Mutex_Is_owner( _Once_Mutex ) );
- _Timecounter_Set_clock( tod_as_timestamp, lock_context );
+ timespec2bintime( tod, &tod_as_bintime );
+ _Timecounter_Set_clock( &tod_as_bintime, lock_context );
- _Timestamp_To_timespec( tod_as_timestamp, &tod_as_timespec );
- tod_as_ticks = _Watchdog_Ticks_from_timespec( &tod_as_timespec );
+ tod_as_ticks = _Watchdog_Ticks_from_timespec( tod );
cpu_count = _SMP_Get_processor_count();
for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {