diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 19:56:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 19:56:14 +0000 |
commit | 4b6546f0bb2687af0463a855a78822785d656d6e (patch) | |
tree | e8fb6b77d7ad5d7a331684d0a8e35d59bc78b910 /cpukit/rtems/include | |
parent | 2007-03-28 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-4b6546f0bb2687af0463a855a78822785d656d6e.tar.bz2 |
2007-03-28 Chris Johns <chrisj@rtems.org>
* 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.
Diffstat (limited to 'cpukit/rtems/include')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/clock.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h index c5f8bb080c..67fa8ab4cd 100644 --- a/cpukit/rtems/include/rtems/rtems/clock.h +++ b/cpukit/rtems/include/rtems/rtems/clock.h @@ -11,10 +11,10 @@ * * + set the current date and time * + obtain the current date and time + * + set the nanoseconds since last clock tick handler * + announce a clock tick * - * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -56,6 +56,12 @@ typedef struct { } rtems_clock_time_value; /* + * Type for the nanoseconds since last tick BSP extension. + */ +typedef Watchdog_Nanoseconds_since_last_tick_routine + rtems_nanoseconds_extension_routine; + +/* * rtems_clock_get * * DESCRIPTION: @@ -97,6 +103,25 @@ rtems_status_code rtems_clock_set( rtems_status_code rtems_clock_tick( void ); +/* + * rtems_clock_set_nanoseconds_extension + * + * DESCRIPTION: + * + * This directive sets the BSP provided nanoseconds since last tick + * extension. + * + * Input parameters: + * routine - pointer to the extension routine + * + * Output parameters: + * RTEMS_SUCCESSFUL - if successful + * error code - if unsuccessful + */ +rtems_status_code rtems_clock_set_nanoseconds_extension( + rtems_nanoseconds_extension_routine routine +); + #ifdef __cplusplus } #endif |