diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-08-22 16:39:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-08-25 08:57:36 +0200 |
commit | f553c6ebbe4c61b239da07e6b7d70afa3b10828e (patch) | |
tree | cb9f29e134ea35dc017d3fcf431efa8a5d6ae84f /cpukit | |
parent | score: Add missing define to cache manager (diff) | |
download | rtems-f553c6ebbe4c61b239da07e6b7d70afa3b10828e.tar.bz2 |
rtems: Inline rtems_clock_get_ticks_since_boot()
Update documentation.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/clock.h | 14 | ||||
-rw-r--r-- | cpukit/rtems/src/clockgettickssinceboot.c | 31 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/watchdog.h | 7 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/watchdogimpl.h | 8 |
5 files changed, 14 insertions, 47 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index b00e25120f..a1fafb1957 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -151,7 +151,6 @@ librtems_a_SOURCES += src/barrierdata.c librtems_a_SOURCES += src/clockget.c librtems_a_SOURCES += src/clockgetsecondssinceepoch.c librtems_a_SOURCES += src/clockgettickspersecond.c -librtems_a_SOURCES += src/clockgettickssinceboot.c librtems_a_SOURCES += src/clockgettod.c librtems_a_SOURCES += src/clockgettodtimeval.c librtems_a_SOURCES += src/clockgetuptime.c diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h index d80218d0d5..ff71665132 100644 --- a/cpukit/rtems/include/rtems/rtems/clock.h +++ b/cpukit/rtems/include/rtems/rtems/clock.h @@ -149,15 +149,15 @@ rtems_status_code rtems_clock_get_seconds_since_epoch( ); /** - * @brief Obtain Ticks Since Boot + * @brief Gets the current ticks counter value. * - * This routine implements the rtems_clock_get_ticks_since_boot - * directive. - * - * @retval This method returns the number of ticks since boot. It cannot - * fail since RTEMS always keeps a running count of ticks since boot. + * @return The current tick counter value. With a 1ms clock tick, this counter + * overflows after 50 days since boot. */ -rtems_interval rtems_clock_get_ticks_since_boot(void); +RTEMS_INLINE_ROUTINE rtems_interval rtems_clock_get_ticks_since_boot(void) +{ + return _Watchdog_Ticks_since_boot; +} /** * @brief Obtain Ticks Per Seconds diff --git a/cpukit/rtems/src/clockgettickssinceboot.c b/cpukit/rtems/src/clockgettickssinceboot.c deleted file mode 100644 index 4aced96073..0000000000 --- a/cpukit/rtems/src/clockgettickssinceboot.c +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @file - * - * @brief Obtain Ticks Since Boot - * @ingroup ClassicClock - */ - -/* - * 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/system.h> -#include <rtems/rtems/status.h> -#include <rtems/rtems/clock.h> -#include <rtems/score/isr.h> -#include <rtems/score/thread.h> -#include <rtems/score/watchdogimpl.h> - -rtems_interval rtems_clock_get_ticks_since_boot(void) -{ - return _Watchdog_Ticks_since_boot; -} diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h index 7327f77204..06c87a138f 100644 --- a/cpukit/score/include/rtems/score/watchdog.h +++ b/cpukit/score/include/rtems/score/watchdog.h @@ -124,6 +124,13 @@ typedef struct { void *user_data; } Watchdog_Control; +/** + * @brief The watchdog ticks counter. + * + * With a 1ms watchdog tick, this counter overflows after 50 days since boot. + */ +SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot; + /**@}*/ #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h index 72b6b3b568..d50e279b40 100644 --- a/cpukit/score/include/rtems/score/watchdogimpl.h +++ b/cpukit/score/include/rtems/score/watchdogimpl.h @@ -85,14 +85,6 @@ SCORE_EXTERN volatile uint32_t _Watchdog_Sync_level; SCORE_EXTERN volatile uint32_t _Watchdog_Sync_count; /** - * @brief The number of ticks since the system was booted. - * - * This contains the number of ticks since the system was booted. - */ - -SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot; - -/** * @brief Watchdog chain which is managed at ticks. * * This is the watchdog chain which is managed at ticks. |