4.104.114.84.95
Last change
on this file since 6f9c75c3 was
6f9c75c3,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/16/98 at 16:56:48
|
Ralf Corsepius reported a number of missing CVS Id's:
RTEMS is under CVS control and has been since rtems 3.1.16 which was
around May 1995. So I just to add the $Id$. If you notice other files
with missing $Id$'s let me know. I try to keep w\up with it.
Now that you have asked -- I'll attach a list of files lacking an RCS-Id to
this mail. This list has been generated by a little sh-script I'll also
enclose.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* Task_switch |
---|
2 | * |
---|
3 | * This routine is the tswitch user extension. It determines which |
---|
4 | * task is being switched to and displays a message indicating the |
---|
5 | * time and date that it gained control. |
---|
6 | * |
---|
7 | * Input parameters: |
---|
8 | * unused - pointer to currently running TCB |
---|
9 | * heir - pointer to heir TCB |
---|
10 | * |
---|
11 | * Output parameters: NONE |
---|
12 | * |
---|
13 | * COPYRIGHT (c) 1989-1997. |
---|
14 | * On-Line Applications Research Corporation (OAR). |
---|
15 | * Copyright assigned to U.S. Government, 1994. |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.OARcorp.com/rtems/license.html. |
---|
20 | * |
---|
21 | * $Id$ |
---|
22 | */ |
---|
23 | |
---|
24 | #include "system.h" |
---|
25 | |
---|
26 | #include "cpuuse.h" |
---|
27 | |
---|
28 | rtems_extension Task_switch( |
---|
29 | rtems_tcb *unused, |
---|
30 | rtems_tcb *heir |
---|
31 | ) |
---|
32 | { |
---|
33 | rtems_unsigned32 index; |
---|
34 | rtems_time_of_day time; |
---|
35 | rtems_status_code status; |
---|
36 | |
---|
37 | index = task_number( heir->Object.id ); |
---|
38 | |
---|
39 | switch( index ) { |
---|
40 | case 1: |
---|
41 | case 2: |
---|
42 | case 3: |
---|
43 | Run_count[ index ] += 1; |
---|
44 | |
---|
45 | status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); |
---|
46 | directive_failed( status, "rtems_clock_get" ); |
---|
47 | |
---|
48 | put_name( Task_name[ index ], FALSE ); |
---|
49 | print_time( "- ", &time, "\n" ); |
---|
50 | |
---|
51 | if ( time.second >= 16 ) { |
---|
52 | CPU_usage_Dump(); |
---|
53 | puts( "*** END OF CPU USAGE LIBRARY TEST ***" ); |
---|
54 | exit( 0 ); |
---|
55 | } |
---|
56 | break; |
---|
57 | |
---|
58 | case 0: |
---|
59 | default: |
---|
60 | break; |
---|
61 | } |
---|
62 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.