forked from Imagelibrary/rtems
rtems: Inline rtems_clock_get_ticks_since_boot()
Update documentation.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -84,14 +84,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.
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@ the clock manager are:
|
||||
@item @code{@value{DIRPREFIX}clock_get_tod_timeval} - Get date and time in timeval format
|
||||
@item @code{@value{DIRPREFIX}clock_get_seconds_since_epoch} - Get seconds since epoch
|
||||
@item @code{@value{DIRPREFIX}clock_get_ticks_per_second} - Get ticks per second
|
||||
@item @code{@value{DIRPREFIX}clock_get_ticks_since_boot} - Get ticks since boot
|
||||
@item @code{@value{DIRPREFIX}clock_get_ticks_since_boot} - Get current ticks counter value
|
||||
@item @code{@value{DIRPREFIX}clock_get_uptime} - Get time since boot
|
||||
@item @code{@value{DIRPREFIX}clock_get_uptime_timeval} - Get time since boot in timeval format
|
||||
@item @code{@value{DIRPREFIX}clock_get_uptime_seconds} - Get seconds since boot
|
||||
@@ -569,19 +569,16 @@ application has configured.
|
||||
|
||||
This directive is callable from an ISR.
|
||||
|
||||
This directive will not cause the running task to be
|
||||
preempted. Re-initializing RTEMS causes the system date and
|
||||
time to be reset to an uninitialized state. Another call to
|
||||
@code{@value{DIRPREFIX}clock_set} is required to re-initialize the
|
||||
system date and time to application specific specifications.
|
||||
This directive will not cause the running task to be preempted.
|
||||
|
||||
@c
|
||||
@c
|
||||
@c
|
||||
@page
|
||||
@subsection CLOCK_GET_TICKS_SINCE_BOOT - Get ticks since boot
|
||||
@subsection CLOCK_GET_TICKS_SINCE_BOOT - Get current ticks counter value
|
||||
|
||||
@cindex obtain ticks since boot
|
||||
@cindex get current ticks counter value
|
||||
|
||||
@subheading CALLING SEQUENCE:
|
||||
|
||||
@@ -604,25 +601,17 @@ NONE
|
||||
|
||||
@subheading DESCRIPTION:
|
||||
|
||||
This directive returns the number of clock ticks that have elapsed
|
||||
since the system was booted. This is the historical measure of uptime
|
||||
in an RTEMS system. The newer service
|
||||
@code{@value{DIRPREFIX}clock_get_uptime} is another and potentially
|
||||
more accurate way of obtaining similar information.
|
||||
This directive returns the current tick counter value. With a 1ms clock tick,
|
||||
this counter overflows after 50 days since boot. This is the historical
|
||||
measure of uptime in an RTEMS system. The newer service
|
||||
@code{@value{DIRPREFIX}clock_get_uptime} is another and potentially more
|
||||
accurate way of obtaining similar information.
|
||||
|
||||
@subheading NOTES:
|
||||
|
||||
This directive is callable from an ISR.
|
||||
|
||||
This directive will not cause the running task to be
|
||||
preempted. Re-initializing RTEMS causes the system date and
|
||||
time to be reset to an uninitialized state. Another call to
|
||||
@code{@value{DIRPREFIX}clock_set} is required to re-initialize the
|
||||
system date and time to application specific specifications.
|
||||
|
||||
This directive simply returns the number of times the dirivective
|
||||
@code{@value{DIRPREFIX}clock_tick} has been invoked since the
|
||||
system was booted.
|
||||
This directive will not cause the running task to be preempted.
|
||||
|
||||
@c
|
||||
@c
|
||||
|
||||
Reference in New Issue
Block a user