From 4b6546f0bb2687af0463a855a78822785d656d6e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 28 Mar 2007 19:56:14 +0000 Subject: 2007-03-28 Chris Johns * rtems/Makefile.am, rtems/include/rtems/rtems/clock.h, score/include/rtems/score/watchdog.h: Add support for a handler to obtain the number of nanoseconds since the last clock tick. The primary interface for this is rtems_clock_set_nanoseconds_extension. Subsequent commits from Joel will redo the TOD support to use this capability. * rtems/src/clocksetnsecshandler.c: New file. --- cpukit/score/include/rtems/score/watchdog.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'cpukit/score/include/rtems/score/watchdog.h') diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h index fc902ad8c7..2432d4d801 100644 --- a/cpukit/score/include/rtems/score/watchdog.h +++ b/cpukit/score/include/rtems/score/watchdog.h @@ -7,7 +7,7 @@ */ /* - * COPYRIGHT (c) 1989-2006. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -50,6 +50,13 @@ extern "C" { */ typedef uint32_t Watchdog_Interval; +/** @brief Watchdog Nanoseconds Since Last Tick Extension + * + * This type defines a pointer to the BSP plugin to obtain the number + * of nanoseconds since the last clock tick. + */ +typedef uint32_t (*Watchdog_Nanoseconds_since_last_tick_routine)(void); + /** @brief Watchdog Service Routine Return Type * * This type defines the return type from a Watchdog Service Routine. @@ -158,6 +165,14 @@ SCORE_EXTERN volatile uint32_t _Watchdog_Sync_count; SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot; +/** @brief Watchdog Nanoseconds Since Last Tick Handler + * + * This is a pointer to the optional BSP plugin to obtain the number + * of nanoseconds since the last clock tick. + */ +SCORE_EXTERN Watchdog_Nanoseconds_since_last_tick_routine + _Watchdog_Nanoseconds_since_tick_handler; + /** @brief Per Ticks Watchdog List * * This is the watchdog chain which is managed at ticks. -- cgit v1.2.3