OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [src/] [clocktick.c] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  Clock Manager
3
 *
4
 *  COPYRIGHT (c) 1989-1999.
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.OARcorp.com/rtems/license.html.
10
 *
11
 *  $Id: clocktick.c,v 1.2 2001-09-27 11:59:19 chris Exp $
12
 */
13
 
14
#include <rtems/system.h>
15
#include <rtems/rtems/status.h>
16
#include <rtems/rtems/clock.h>
17
#include <rtems/score/isr.h>
18
#include <rtems/score/thread.h>
19
#include <rtems/score/tod.h>
20
#include <rtems/score/watchdog.h>
21
 
22
/*PAGE
23
 *
24
 *  rtems_clock_tick
25
 *
26
 *  This directive notifies the executve that a tick has occurred.
27
 *  When the tick occurs the time manager updates and maintains
28
 *  the calendar time, timeslicing, and any timeout delays.
29
 *
30
 *  Input parameters:  NONE
31
 *
32
 *  Output parameters:
33
 *    RTEMS_SUCCESSFUL - always succeeds
34
 *
35
 *  NOTE: This routine only works for leap-years through 2099.
36
 */
37
 
38
rtems_status_code rtems_clock_tick( void )
39
{
40
  _TOD_Tickle_ticks();
41
 
42
  _Watchdog_Tickle_ticks();
43
 
44
  _Thread_Tickle_timeslice();
45
 
46
  if ( _Thread_Is_context_switch_necessary() &&
47
       _Thread_Is_dispatching_enabled() )
48
    _Thread_Dispatch();
49
 
50
  return RTEMS_SUCCESSFUL;
51
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.