From bd83f4738f0f6d071dee6601f0b71abf27f80469 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 17 May 1999 22:42:47 +0000 Subject: Split Clock Manager into one routine per file. --- cpukit/rtems/src/clocktick.c | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cpukit/rtems/src/clocktick.c (limited to 'cpukit/rtems/src/clocktick.c') diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c new file mode 100644 index 0000000000..b07c9cb1a0 --- /dev/null +++ b/cpukit/rtems/src/clocktick.c @@ -0,0 +1,52 @@ +/* + * Clock Manager + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include +#include +#include +#include +#include +#include +#include + +/*PAGE + * + * rtems_clock_tick + * + * This directive notifies the executve that a tick has occurred. + * When the tick occurs the time manager updates and maintains + * the calendar time, timeslicing, and any timeout delays. + * + * Input parameters: NONE + * + * Output parameters: + * RTEMS_SUCCESSFUL - always succeeds + * + * NOTE: This routine only works for leap-years through 2099. + */ + +rtems_status_code rtems_clock_tick( void ) +{ + _TOD_Tickle_ticks(); + + _Watchdog_Tickle_ticks(); + + _Thread_Tickle_timeslice(); + + if ( _Thread_Is_context_switch_necessary() && + _Thread_Is_dispatching_enabled() ) + _Thread_Dispatch(); + + return RTEMS_SUCCESSFUL; +} -- cgit v1.2.3