source:
rtems/c/src/ada-tests/mptests/mp09/mptest.ads
@
8fdfc9f6
Last change on this file since 8fdfc9f6 was 35e4691, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:50:41 | |
---|---|
|
|
File size: 6.7 KB |
Line | |
---|---|
1 | -- |
2 | -- MPTEST / SPECIFICATION |
3 | -- |
4 | -- DESCRIPTION: |
5 | -- |
6 | -- This package is the specification for Test 9 of the RTEMS |
7 | -- Multiprocessor Test Suite. |
8 | -- |
9 | -- DEPENDENCIES: |
10 | -- |
11 | -- |
12 | -- |
13 | -- COPYRIGHT (c) 1989-1997. |
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.com/license/LICENSE. |
19 | -- |
20 | -- $Id$ |
21 | -- |
22 | |
23 | with RTEMS; |
24 | |
25 | package MPTEST is |
26 | |
27 | -- |
28 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
29 | -- by this test. |
30 | -- |
31 | |
32 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
33 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
34 | |
35 | -- |
36 | -- These arrays contain the IDs and NAMEs of all RTEMS message |
37 | -- queues created by this test. |
38 | -- |
39 | |
40 | QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
41 | QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; |
42 | |
43 | -- |
44 | -- The following are message buffers used to contain the test messages |
45 | -- and pointers to those buffers. |
46 | -- |
47 | |
48 | RECEIVE_BUFFER_AREA : RTEMS.BUFFER; |
49 | BUFFER_AREA_1 : RTEMS.BUFFER; |
50 | BUFFER_AREA_2 : RTEMS.BUFFER; |
51 | BUFFER_AREA_3 : RTEMS.BUFFER; |
52 | BUFFER_AREA_4 : RTEMS.BUFFER; |
53 | |
54 | RECEIVE_BUFFER : RTEMS.BUFFER_POINTER; |
55 | BUFFER_1 : RTEMS.BUFFER_POINTER; |
56 | BUFFER_2 : RTEMS.BUFFER_POINTER; |
57 | BUFFER_3 : RTEMS.BUFFER_POINTER; |
58 | BUFFER_4 : RTEMS.BUFFER_POINTER; |
59 | |
60 | -- |
61 | -- This variable contains the ID of the remote task with which this |
62 | -- test interacts. |
63 | -- |
64 | |
65 | REMOTE_TID : RTEMS.ID; |
66 | |
67 | -- |
68 | -- This variable contains the node on which the remote task with which |
69 | -- this test interacts resides. |
70 | -- |
71 | |
72 | REMOTE_NODE : RTEMS.UNSIGNED32; |
73 | |
74 | -- |
75 | -- The number of events to process per dot printed out. |
76 | -- |
77 | |
78 | PER_DOT : constant RTEMS.UNSIGNED32 := 100; |
79 | |
80 | -- |
81 | -- INIT |
82 | -- |
83 | -- DESCRIPTION: |
84 | -- |
85 | -- This RTEMS task initializes the application. |
86 | -- |
87 | |
88 | procedure INIT ( |
89 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
90 | ); |
91 | |
92 | -- |
93 | -- SEND_MESSAGES |
94 | -- |
95 | -- This subprogram prints and sends a sequence of three test messages. |
96 | -- One of the messages is sent, one is urgent, and one is broadcast. |
97 | -- A one second pause is between each the sending of each message. |
98 | -- |
99 | |
100 | procedure SEND_MESSAGES; |
101 | |
102 | -- |
103 | -- RECEIVE_MESSAGES |
104 | -- |
105 | -- This subprogram receives and prints a sequence of three test messages. |
106 | -- |
107 | |
108 | procedure RECEIVE_MESSAGES; |
109 | |
110 | -- |
111 | -- FILL_BUFFER |
112 | -- |
113 | -- DESCRIPTION: |
114 | -- |
115 | -- This subprogram takes the SOURCE input string and places |
116 | -- up to the first sixteen characters of that string into |
117 | -- the message BUFFER. |
118 | -- |
119 | |
120 | procedure FILL_BUFFER ( |
121 | SOURCE : in STRING; |
122 | BUFFER : out RTEMS.BUFFER |
123 | ); |
124 | |
125 | -- |
126 | -- PUT_BUFFER |
127 | -- |
128 | -- DESCRIPTION: |
129 | -- |
130 | -- This subprogram prints the specified message BUFFER. |
131 | -- |
132 | |
133 | procedure PUT_BUFFER ( |
134 | BUFFER : in RTEMS.BUFFER |
135 | ); |
136 | |
137 | -- |
138 | -- TEST_TASK |
139 | -- |
140 | -- DESCRIPTION: |
141 | -- |
142 | -- This is the body of the RTEMS tasks which constitute this test. |
143 | -- |
144 | |
145 | procedure TEST_TASK ( |
146 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
147 | ); |
148 | |
149 | -- |
150 | -- This is the Driver Address Table for this test. |
151 | -- |
152 | |
153 | DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := |
154 | (1=> |
155 | ( |
156 | CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization |
157 | RTEMS.NO_DRIVER_ENTRY, -- Open |
158 | RTEMS.NO_DRIVER_ENTRY, -- Close |
159 | RTEMS.NO_DRIVER_ENTRY, -- Read |
160 | RTEMS.NO_DRIVER_ENTRY, -- Write |
161 | RTEMS.NO_DRIVER_ENTRY -- Control |
162 | ) |
163 | ); |
164 | |
165 | -- |
166 | -- This is the Initialization Tasks Table for this test. |
167 | -- |
168 | |
169 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
170 | (1=> |
171 | ( |
172 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
173 | 2048, -- stack size |
174 | 1, -- priority |
175 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
176 | MPTEST.INIT'ACCESS, -- entry point |
177 | RTEMS.NO_PREEMPT, -- initial mode |
178 | 0 -- argument list |
179 | ) |
180 | ); |
181 | |
182 | ---------------------------------------------------------------------------- |
183 | ---------------------------------------------------------------------------- |
184 | -- BEGIN SUBPACKAGE -- |
185 | ---------------------------------------------------------------------------- |
186 | ---------------------------------------------------------------------------- |
187 | |
188 | -- |
189 | -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION |
190 | -- |
191 | -- DESCRIPTION: |
192 | -- |
193 | -- This package is the specification for the subpackage |
194 | -- which will define the per node configuration parameters. |
195 | -- |
196 | |
197 | package PER_NODE_CONFIGURATION is |
198 | |
199 | -- |
200 | -- LOCAL_NODE_NUMBER |
201 | -- |
202 | -- DESCRIPTION: |
203 | -- |
204 | -- This function returns the node number for this node. |
205 | -- |
206 | |
207 | function LOCAL_NODE_NUMBER |
208 | return RTEMS.UNSIGNED32; |
209 | |
210 | pragma INLINE ( LOCAL_NODE_NUMBER ); |
211 | |
212 | end PER_NODE_CONFIGURATION; |
213 | |
214 | ---------------------------------------------------------------------------- |
215 | ---------------------------------------------------------------------------- |
216 | -- END SUBPACKAGE -- |
217 | ---------------------------------------------------------------------------- |
218 | ---------------------------------------------------------------------------- |
219 | |
220 | -- |
221 | -- This is the Multiprocessor Configuration Table for this test. |
222 | -- |
223 | |
224 | MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( |
225 | MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, |
226 | 2, -- maximum # nodes in system |
227 | 32, -- maximum # global objects |
228 | 32 -- maximum # proxies |
229 | ); |
230 | |
231 | -- |
232 | -- This is the Configuration Table for this test. |
233 | -- |
234 | |
235 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
236 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
237 | 64 * 1024, -- executive RAM size |
238 | 10, -- maximum # tasks |
239 | 0, -- maximum # timers |
240 | 0, -- maximum # semaphores |
241 | 1, -- maximum # message queues |
242 | 1, -- maximum # messages |
243 | 0, -- maximum # partitions |
244 | 0, -- maximum # regions |
245 | 0, -- maximum # dp memory areas |
246 | 0, -- maximum # periods |
247 | 0, -- maximum # user extensions |
248 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
249 | 50 -- # ticks in a timeslice |
250 | ); |
251 | |
252 | end MPTEST; |
Note: See TracBrowser
for help on using the repository browser.