4.104.115
Line | |
---|
1 | /* |
---|
2 | * Time of Day (TOD) Handler |
---|
3 | */ |
---|
4 | |
---|
5 | /* COPYRIGHT (c) 1989-2008. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.rtems.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #if HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/system.h> |
---|
20 | #include <rtems/score/object.h> |
---|
21 | #include <rtems/score/thread.h> |
---|
22 | #include <rtems/score/tod.h> |
---|
23 | #include <rtems/score/watchdog.h> |
---|
24 | |
---|
25 | /*PAGE |
---|
26 | * |
---|
27 | * _TOD_Handler_initialization |
---|
28 | * |
---|
29 | * This routine initializes the time of day handler. |
---|
30 | * |
---|
31 | * Input parameters: NONE |
---|
32 | * |
---|
33 | * Output parameters: NONE |
---|
34 | */ |
---|
35 | |
---|
36 | void _TOD_Handler_initialization(void) |
---|
37 | { |
---|
38 | /* POSIX format TOD (timespec) */ |
---|
39 | _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); |
---|
40 | |
---|
41 | /* Uptime (timespec) */ |
---|
42 | _Timestamp_Set_to_zero( &_TOD_Uptime ); |
---|
43 | |
---|
44 | /* TOD has not been set */ |
---|
45 | _TOD_Is_set = false; |
---|
46 | _TOD_Activate(); |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.