1 | -- |
---|
2 | -- MPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 14 of the RTEMS |
---|
7 | -- Multiprocessor Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989-2011. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- |
---|
16 | -- The license and distribution terms for this file may in |
---|
17 | -- the file LICENSE in this distribution or at |
---|
18 | -- http://www.rtems.org/license/LICENSE. |
---|
19 | -- |
---|
20 | |
---|
21 | with RTEMS; |
---|
22 | with RTEMS.TASKS; |
---|
23 | |
---|
24 | package MPTEST is |
---|
25 | |
---|
26 | -- |
---|
27 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
28 | -- by this test for passing event sets. |
---|
29 | -- |
---|
30 | |
---|
31 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
32 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
33 | -- |
---|
34 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
35 | -- by this test for passing event sets. |
---|
36 | -- |
---|
37 | |
---|
38 | EVENT_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
39 | EVENT_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
40 | |
---|
41 | -- |
---|
42 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
43 | -- by this test for manipulating semaphores. |
---|
44 | -- |
---|
45 | |
---|
46 | SEMAPHORE_TASK_ID : |
---|
47 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
48 | SEMAPHORE_TASK_NAME : |
---|
49 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
50 | |
---|
51 | -- |
---|
52 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
53 | -- by this test for passing messages. |
---|
54 | -- |
---|
55 | |
---|
56 | QUEUE_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
57 | QUEUE_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
58 | |
---|
59 | -- |
---|
60 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
61 | -- by this test for manipulating the global partitions. |
---|
62 | -- |
---|
63 | |
---|
64 | PARTITION_TASK_ID : |
---|
65 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
66 | PARTITION_TASK_NAME : |
---|
67 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
68 | |
---|
69 | -- |
---|
70 | -- These arrays contain the IDs and NAMEs of all RTEMS partitions |
---|
71 | -- created by this test. |
---|
72 | -- |
---|
73 | |
---|
74 | PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
75 | PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
76 | |
---|
77 | -- |
---|
78 | -- These arrays contain the IDs and NAMEs of all RTEMS semaphores |
---|
79 | -- created by this test. |
---|
80 | -- |
---|
81 | |
---|
82 | SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
83 | SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
84 | |
---|
85 | -- |
---|
86 | -- These arrays contain the IDs and NAMEs of all RTEMS message_queues |
---|
87 | -- created by this test. |
---|
88 | -- |
---|
89 | |
---|
90 | QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
91 | QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
92 | |
---|
93 | -- |
---|
94 | -- |
---|
95 | -- These arrays contain the IDs and NAMEs of all RTEMS timers |
---|
96 | -- created by this test. |
---|
97 | -- |
---|
98 | |
---|
99 | TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
100 | TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
101 | |
---|
102 | -- |
---|
103 | -- The following are message buffers used to contain the test messages |
---|
104 | -- and pointers to those buffers. |
---|
105 | -- |
---|
106 | |
---|
107 | BUFFER_AREAS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER; |
---|
108 | BUFFERS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ADDRESS; |
---|
109 | |
---|
110 | -- |
---|
111 | -- This is the area used for the partition. |
---|
112 | -- |
---|
113 | |
---|
114 | PARTITION_AREA : |
---|
115 | array ( RTEMS.UNSIGNED32 range 0 .. 16#7FFF# ) of RTEMS.UNSIGNED8; |
---|
116 | for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; |
---|
117 | |
---|
118 | -- |
---|
119 | -- The following constants control the flow of "dot" indicators |
---|
120 | -- from the various test componenents. |
---|
121 | -- |
---|
122 | |
---|
123 | EVENT_TASK_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100; |
---|
124 | EVENT_SEND_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100; |
---|
125 | DELAYED_EVENT_DOT_COUNT : constant RTEMS.UNSIGNED32 := 1000; |
---|
126 | MESSAGE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
127 | PARTITION_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
128 | SEMAPHORE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
129 | |
---|
130 | -- |
---|
131 | -- These contain the IDs and NAMEs of the RTEMS timers used |
---|
132 | -- by this test to stop. |
---|
133 | -- |
---|
134 | |
---|
135 | STOP_TIMER_ID : RTEMS.ID; |
---|
136 | STOP_TIMER_NAME : RTEMS.NAME; |
---|
137 | |
---|
138 | -- |
---|
139 | -- This variable is set when the test should stop executing. |
---|
140 | -- |
---|
141 | |
---|
142 | STOP_TEST : BOOLEAN; |
---|
143 | |
---|
144 | -- |
---|
145 | -- EXIT_TEST |
---|
146 | -- |
---|
147 | -- DESCRIPTION: |
---|
148 | -- |
---|
149 | -- This subprogram is invoked to stop this test. |
---|
150 | -- |
---|
151 | |
---|
152 | procedure EXIT_TEST; |
---|
153 | |
---|
154 | -- |
---|
155 | -- DELAYED_SEND_EVENT |
---|
156 | -- |
---|
157 | -- DESCRIPTION: |
---|
158 | -- |
---|
159 | -- This subprogram is a timer service routine which sends an |
---|
160 | -- event set to a waiting task. |
---|
161 | -- |
---|
162 | |
---|
163 | procedure DELAYED_SEND_EVENT ( |
---|
164 | TIMER_ID : in RTEMS.ID; |
---|
165 | IGNORED_ADDRESS : in RTEMS.ADDRESS |
---|
166 | ); |
---|
167 | |
---|
168 | -- |
---|
169 | -- INIT |
---|
170 | -- |
---|
171 | -- DESCRIPTION: |
---|
172 | -- |
---|
173 | -- This RTEMS task initializes the application. |
---|
174 | -- |
---|
175 | |
---|
176 | procedure INIT ( |
---|
177 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
178 | ); |
---|
179 | pragma Convention (C, INIT); |
---|
180 | |
---|
181 | -- |
---|
182 | -- TEST_TASK |
---|
183 | -- |
---|
184 | -- DESCRIPTION: |
---|
185 | -- |
---|
186 | -- This is one of the test tasks. |
---|
187 | -- |
---|
188 | |
---|
189 | procedure TEST_TASK ( |
---|
190 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
191 | ); |
---|
192 | pragma Convention (C, TEST_TASK); |
---|
193 | |
---|
194 | -- |
---|
195 | -- DELAYED_EVENTS_TASK |
---|
196 | -- |
---|
197 | -- DESCRIPTION: |
---|
198 | -- |
---|
199 | -- This is one of the test tasks. |
---|
200 | -- |
---|
201 | |
---|
202 | procedure DELAYED_EVENTS_TASK ( |
---|
203 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
204 | ); |
---|
205 | pragma Convention (C, DELAYED_EVENTS_TASK); |
---|
206 | |
---|
207 | -- |
---|
208 | -- MESSAGE_QUEUE_TASK |
---|
209 | -- |
---|
210 | -- DESCRIPTION: |
---|
211 | -- |
---|
212 | -- This is one of the test tasks. |
---|
213 | -- |
---|
214 | |
---|
215 | procedure MESSAGE_QUEUE_TASK ( |
---|
216 | INDEX : in RTEMS.TASKS.ARGUMENT |
---|
217 | ); |
---|
218 | pragma Convention (C, MESSAGE_QUEUE_TASK); |
---|
219 | |
---|
220 | -- |
---|
221 | -- PARTITION_TASK |
---|
222 | -- |
---|
223 | -- DESCRIPTION: |
---|
224 | -- |
---|
225 | -- This is one of the test tasks. |
---|
226 | -- |
---|
227 | |
---|
228 | procedure PARTITION_TASK ( |
---|
229 | IGNORED : in RTEMS.TASKS.ARGUMENT |
---|
230 | ); |
---|
231 | pragma Convention (C, PARTITION_TASK); |
---|
232 | |
---|
233 | -- |
---|
234 | -- SEMAPHORE_TASK |
---|
235 | -- |
---|
236 | -- DESCRIPTION: |
---|
237 | -- |
---|
238 | -- This is one of the test tasks. |
---|
239 | -- |
---|
240 | |
---|
241 | procedure SEMAPHORE_TASK ( |
---|
242 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
243 | ); |
---|
244 | pragma Convention (C, SEMAPHORE_TASK); |
---|
245 | |
---|
246 | end MPTEST; |
---|