diff options
author | Alexander Krutwig <alexander.krutwig@embedded-brains.de> | 2015-05-12 14:32:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-20 08:40:33 +0200 |
commit | 7cd2484c4cf9fc759b7205ed6d8adcc6d2c28ff6 (patch) | |
tree | dd60b6032354124d97233e7070506f09d1566832 /cpukit/score/src/coretodget.c | |
parent | timecounter: Port to RTEMS (diff) | |
download | rtems-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/coretodget.c')
-rw-r--r-- | cpukit/score/src/coretodget.c | 46 |
1 files changed, 0 insertions, 46 deletions
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; -} |