4.104.114.84.95
Last change
on this file since bd83f47 was
bd83f47,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/99 at 22:42:47
|
Split Clock Manager into one routine per file.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[bd83f47] | 1 | /* |
---|
| 2 | * Clock Manager |
---|
| 3 | * |
---|
| 4 | * COPYRIGHT (c) 1989-1998. |
---|
| 5 | * On-Line Applications Research Corporation (OAR). |
---|
| 6 | * Copyright assigned to U.S. Government, 1994. |
---|
| 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.OARcorp.com/rtems/license.html. |
---|
| 11 | * |
---|
| 12 | * $Id$ |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | #include <rtems/system.h> |
---|
| 16 | #include <rtems/rtems/status.h> |
---|
| 17 | #include <rtems/rtems/clock.h> |
---|
| 18 | #include <rtems/score/isr.h> |
---|
| 19 | #include <rtems/score/thread.h> |
---|
| 20 | #include <rtems/score/tod.h> |
---|
| 21 | #include <rtems/score/watchdog.h> |
---|
| 22 | |
---|
| 23 | /*PAGE |
---|
| 24 | * |
---|
| 25 | * rtems_clock_tick |
---|
| 26 | * |
---|
| 27 | * This directive notifies the executve that a tick has occurred. |
---|
| 28 | * When the tick occurs the time manager updates and maintains |
---|
| 29 | * the calendar time, timeslicing, and any timeout delays. |
---|
| 30 | * |
---|
| 31 | * Input parameters: NONE |
---|
| 32 | * |
---|
| 33 | * Output parameters: |
---|
| 34 | * RTEMS_SUCCESSFUL - always succeeds |
---|
| 35 | * |
---|
| 36 | * NOTE: This routine only works for leap-years through 2099. |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | rtems_status_code rtems_clock_tick( void ) |
---|
| 40 | { |
---|
| 41 | _TOD_Tickle_ticks(); |
---|
| 42 | |
---|
| 43 | _Watchdog_Tickle_ticks(); |
---|
| 44 | |
---|
| 45 | _Thread_Tickle_timeslice(); |
---|
| 46 | |
---|
| 47 | if ( _Thread_Is_context_switch_necessary() && |
---|
| 48 | _Thread_Is_dispatching_enabled() ) |
---|
| 49 | _Thread_Dispatch(); |
---|
| 50 | |
---|
| 51 | return RTEMS_SUCCESSFUL; |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.