1 | -- |
---|
2 | -- SPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 4 of the RTEMS |
---|
7 | -- Single Processor Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
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 in |
---|
18 | -- the file LICENSE in this distribution or at |
---|
19 | -- http://www.OARcorp.com/rtems/license.html. |
---|
20 | -- |
---|
21 | -- $Id$ |
---|
22 | -- |
---|
23 | |
---|
24 | with CLOCK_DRIVER; |
---|
25 | with RTEMS; |
---|
26 | |
---|
27 | package SPTEST is |
---|
28 | |
---|
29 | -- |
---|
30 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
31 | -- by this test. |
---|
32 | -- |
---|
33 | |
---|
34 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
35 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
---|
36 | |
---|
37 | -- |
---|
38 | -- These arrays contain the IDs and NAMEs of all RTEMS extensions created |
---|
39 | -- by this test. |
---|
40 | -- |
---|
41 | |
---|
42 | EXTENSION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
43 | EXTENSION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
---|
44 | |
---|
45 | -- |
---|
46 | -- This array contains the number of times each of the test tasks has |
---|
47 | -- been context switched TO. |
---|
48 | -- |
---|
49 | |
---|
50 | RUN_COUNT : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.UNSIGNED32; |
---|
51 | |
---|
52 | -- |
---|
53 | -- INIT |
---|
54 | -- |
---|
55 | -- DESCRIPTION: |
---|
56 | -- |
---|
57 | -- This RTEMS task initializes the application. |
---|
58 | -- |
---|
59 | |
---|
60 | procedure INIT ( |
---|
61 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
62 | ); |
---|
63 | |
---|
64 | -- |
---|
65 | -- TASK_1 |
---|
66 | -- |
---|
67 | -- DESCRIPTION: |
---|
68 | -- |
---|
69 | -- This RTEMS task tests some of the capabilities of the Task Manager. |
---|
70 | -- |
---|
71 | |
---|
72 | procedure TASK_1 ( |
---|
73 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
74 | ); |
---|
75 | |
---|
76 | -- |
---|
77 | -- TASK_2 |
---|
78 | -- |
---|
79 | -- DESCRIPTION: |
---|
80 | -- |
---|
81 | -- This RTEMS task is used as a background task to suspend, resume, |
---|
82 | -- and context switch to. |
---|
83 | -- |
---|
84 | |
---|
85 | procedure TASK_2 ( |
---|
86 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
87 | ); |
---|
88 | |
---|
89 | -- |
---|
90 | -- TASK_3 |
---|
91 | -- |
---|
92 | -- DESCRIPTION: |
---|
93 | -- |
---|
94 | -- This RTEMS task is used as a background task to suspend, resume, |
---|
95 | -- and context switch to. |
---|
96 | -- |
---|
97 | |
---|
98 | procedure TASK_3 ( |
---|
99 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
100 | ); |
---|
101 | |
---|
102 | -- |
---|
103 | -- TASK_SWITCH |
---|
104 | -- |
---|
105 | -- DESCRIPTION: |
---|
106 | -- |
---|
107 | -- This subprogram is the TASK_SWITCH extension for this test. |
---|
108 | -- It is invoked at each context switch and counts the number |
---|
109 | -- of times each application task has been context switched to. |
---|
110 | -- |
---|
111 | |
---|
112 | procedure TASK_SWITCH ( |
---|
113 | UNUSED : in RTEMS.TCB_POINTER; |
---|
114 | HEIR : in RTEMS.TCB_POINTER |
---|
115 | ); |
---|
116 | |
---|
117 | end SPTEST; |
---|