1 | -- |
---|
2 | -- TMTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 19 of the RTEMS |
---|
7 | -- Timing 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 RTEMS; |
---|
25 | with TIME_TEST_SUPPORT; |
---|
26 | with TIMER_DRIVER; |
---|
27 | |
---|
28 | package TMTEST is |
---|
29 | |
---|
30 | -- |
---|
31 | -- This array contains the IDs of all RTEMS tasks created by this test. |
---|
32 | -- |
---|
33 | |
---|
34 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
35 | |
---|
36 | -- |
---|
37 | -- The following variable is set to the execution time returned |
---|
38 | -- by the timer. |
---|
39 | -- |
---|
40 | |
---|
41 | END_TIME : RTEMS.UNSIGNED32; |
---|
42 | |
---|
43 | -- |
---|
44 | -- INIT |
---|
45 | -- |
---|
46 | -- DESCRIPTION: |
---|
47 | -- |
---|
48 | -- This RTEMS task initializes the application. |
---|
49 | -- |
---|
50 | |
---|
51 | procedure INIT ( |
---|
52 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
53 | ); |
---|
54 | |
---|
55 | -- |
---|
56 | -- PROCESS_ASR_FOR_PASS_1 |
---|
57 | -- |
---|
58 | -- DESCRIPTION: |
---|
59 | -- |
---|
60 | -- This subprogram is the ASR used to measure and report the |
---|
61 | -- execution time of a SIGNAL_SEND to SELF. Before it exits |
---|
62 | -- it starts the timer so that the execution time required to |
---|
63 | -- exit from an ASR back to the same task can be measured. |
---|
64 | -- |
---|
65 | |
---|
66 | procedure PROCESS_ASR_FOR_PASS_1 ( |
---|
67 | SIGNALS : in RTEMS.SIGNAL_SET |
---|
68 | ); |
---|
69 | |
---|
70 | -- |
---|
71 | -- PROCESS_ASR_FOR_PASS_2 |
---|
72 | -- |
---|
73 | -- DESCRIPTION: |
---|
74 | -- |
---|
75 | -- This subprogram is the ASR which sets up for a preemptive |
---|
76 | -- return from an ASR. Before it exits it starts the timer |
---|
77 | -- so that the execution time required to exit from an ASR |
---|
78 | -- and transfer control to the another task can be measured. |
---|
79 | -- |
---|
80 | |
---|
81 | procedure PROCESS_ASR_FOR_PASS_2 ( |
---|
82 | SIGNALS : in RTEMS.SIGNAL_SET |
---|
83 | ); |
---|
84 | |
---|
85 | -- |
---|
86 | -- TASK_1 |
---|
87 | -- |
---|
88 | -- DESCRIPTION: |
---|
89 | -- |
---|
90 | -- This RTEMS task is responsible for measuring and reporting |
---|
91 | -- the following execution times: |
---|
92 | -- |
---|
93 | -- + SIGNAL_CATCH |
---|
94 | -- + non-preemptive SIGNAL_SEND |
---|
95 | -- + non-preemptive return from an ASR |
---|
96 | -- |
---|
97 | |
---|
98 | procedure TASK_1 ( |
---|
99 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
100 | ); |
---|
101 | |
---|
102 | -- |
---|
103 | -- PROCESS_ASR_FOR_TASK_2 |
---|
104 | -- |
---|
105 | -- DESCRIPTION: |
---|
106 | -- |
---|
107 | -- This subprogram is the ASR for TASK_2. It performs no actions. |
---|
108 | -- |
---|
109 | |
---|
110 | procedure PROCESS_ASR_FOR_TASK_2 ( |
---|
111 | SIGNALS : in RTEMS.SIGNAL_SET |
---|
112 | ); |
---|
113 | |
---|
114 | -- |
---|
115 | -- TASK_2 |
---|
116 | -- |
---|
117 | -- DESCRIPTION: |
---|
118 | -- |
---|
119 | -- This RTEMS task is used as the recipient of a SIGNAL_SEND. |
---|
120 | -- After establishing an ASR, it suspends itself to insure |
---|
121 | -- that it does not execute again. |
---|
122 | -- |
---|
123 | |
---|
124 | procedure TASK_2 ( |
---|
125 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
126 | ); |
---|
127 | |
---|
128 | -- |
---|
129 | -- TASK_3 |
---|
130 | -- |
---|
131 | -- DESCRIPTION: |
---|
132 | -- |
---|
133 | -- This RTEMS task is used as the recipient of a preemptive |
---|
134 | -- SIGNAL_SEND. This task suspends itself and is resumed by |
---|
135 | -- an ASR for TASK_1. Once the task executes, it stops the |
---|
136 | -- timer and reports the execution time for a preemptive |
---|
137 | -- return from an ASR. |
---|
138 | -- |
---|
139 | |
---|
140 | procedure TASK_3 ( |
---|
141 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
142 | ); |
---|
143 | |
---|
144 | -- |
---|
145 | -- This is the Initialization Tasks Table for this test. |
---|
146 | -- |
---|
147 | |
---|
148 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
149 | (1=> |
---|
150 | ( |
---|
151 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
152 | 2048, -- stack size |
---|
153 | 1, -- priority |
---|
154 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
155 | TMTEST.INIT'ACCESS, -- entry point |
---|
156 | RTEMS.NO_PREEMPT, -- initial mode |
---|
157 | 0 -- argument list |
---|
158 | ) |
---|
159 | ); |
---|
160 | |
---|
161 | -- |
---|
162 | -- This is the Configuration Table for this test. |
---|
163 | -- |
---|
164 | |
---|
165 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
166 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
167 | 256 * 1024, -- executive RAM size |
---|
168 | 111, -- maximum # tasks |
---|
169 | 0, -- maximum # timers |
---|
170 | 0, -- maximum # semaphores |
---|
171 | 1, -- maximum # message queues |
---|
172 | 100, -- maximum # messages |
---|
173 | 0, -- maximum # partitions |
---|
174 | 0, -- maximum # regions |
---|
175 | 0, -- maximum # dp memory areas |
---|
176 | 0, -- maximum # periods |
---|
177 | 0, -- maximum # user extensions |
---|
178 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
179 | 0 -- # ticks in a timeslice |
---|
180 | ); |
---|
181 | |
---|
182 | end TMTEST; |
---|