4.104.114.84.95
Last change
on this file since 4b6546f0 was
4b6546f0,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/28/07 at 19:56:14
|
2007-03-28 Chris Johns <chrisj@…>
- 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.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * Clock Manager |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2006. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include "config.h" |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <rtems/system.h> |
---|
19 | #include <rtems/rtems/status.h> |
---|
20 | #include <rtems/rtems/clock.h> |
---|
21 | #include <rtems/score/isr.h> |
---|
22 | #include <rtems/score/thread.h> |
---|
23 | #include <rtems/score/tod.h> |
---|
24 | #include <rtems/score/watchdog.h> |
---|
25 | |
---|
26 | /*PAGE |
---|
27 | * |
---|
28 | * rtems_clock_set_nanoseconds_extension |
---|
29 | * |
---|
30 | * This directive sets the BSP provided nanoseconds since last tick |
---|
31 | * extension. |
---|
32 | * |
---|
33 | * Input parameters: |
---|
34 | * routine - pointer to the extension routine |
---|
35 | * |
---|
36 | * Output parameters: |
---|
37 | * RTEMS_SUCCESSFUL - if successful |
---|
38 | * error code - if unsuccessful |
---|
39 | */ |
---|
40 | rtems_status_code rtems_clock_set_nanoseconds_extension( |
---|
41 | rtems_nanoseconds_extension_routine routine |
---|
42 | ) |
---|
43 | { |
---|
44 | if ( !routine ) |
---|
45 | return RTEMS_INVALID_ADDRESS; |
---|
46 | |
---|
47 | _Watchdog_Nanoseconds_since_tick_handler = routine; |
---|
48 | return RTEMS_SUCCESSFUL; |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.