source: rtems/c/src/ada-tests/mptests/mp14/mptest.ads @ d0d73ec

4.104.114.84.95
Last change on this file since d0d73ec was d0f426a1, checked in by Joel Sherrill <joel.sherrill@…>, on 06/03/97 at 00:34:04

* empty log message *

  • Property mode set to 100644
File size: 9.2 KB
Line 
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-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
24with BSP_MPCI;
25with RTEMS;
26
27package MPTEST is
28
29--
30--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
31--  by this test for passing event sets.
32--
33
34   TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
35   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
36--
37--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
38--  by this test for passing event sets.
39--
40
41   EVENT_TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
42   EVENT_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
43
44--
45--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
46--  by this test for manipulating semaphores.
47--
48
49   SEMAPHORE_TASK_ID   :
50      array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
51   SEMAPHORE_TASK_NAME :
52      array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
53
54--
55--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
56--  by this test for passing messages.
57--
58
59   QUEUE_TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
60   QUEUE_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
61
62--
63--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
64--  by this test for manipulating the global partitions.
65--
66
67   PARTITION_TASK_ID   :
68      array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
69   PARTITION_TASK_NAME :
70      array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
71
72--
73--  These arrays contain the IDs and NAMEs of all RTEMS partitions
74--  created by this test.
75--
76
77   PARTITION_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
78   PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
79
80--
81--  These arrays contain the IDs and NAMEs of all RTEMS semaphores
82--  created by this test.
83--
84
85   SEMAPHORE_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
86   SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
87
88--
89--  These arrays contain the IDs and NAMEs of all RTEMS message_queues
90--  created by this test.
91--
92
93   QUEUE_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
94   QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
95
96--
97--
98--  These arrays contain the IDs and NAMEs of all RTEMS timers
99--  created by this test.
100--
101
102   TIMER_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
103   TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
104
105--
106--  The following are message buffers used to contain the test messages
107--  and pointers to those buffers.
108--
109
110   BUFFER_AREAS : array (  RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER;
111   BUFFERS      :
112      array (  RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER_POINTER;
113
114--
115--  This is the area used for the partition.
116--
117
118   PARTITION_AREA :
119      array ( RTEMS.UNSIGNED32 range 0 .. 16#7FFF# ) of RTEMS.UNSIGNED8;
120   for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
121
122--
123--  The following constants control the flow of "dot" indicators
124--  from the various test componenents.
125--
126
127   EVENT_TASK_DOT_COUNT    : constant RTEMS.UNSIGNED32 := 100;
128   EVENT_SEND_DOT_COUNT    : constant RTEMS.UNSIGNED32 := 100;
129   DELAYED_EVENT_DOT_COUNT : constant RTEMS.UNSIGNED32 := 1000;
130   MESSAGE_DOT_COUNT       : constant RTEMS.UNSIGNED32 := 200;
131   PARTITION_DOT_COUNT     : constant RTEMS.UNSIGNED32 := 200;
132   SEMAPHORE_DOT_COUNT     : constant RTEMS.UNSIGNED32 := 200;
133
134--
135--  These contain the IDs and NAMEs of the RTEMS timers used
136--  by this test to stop.
137--
138 
139   STOP_TIMER_ID   : RTEMS.ID;
140   STOP_TIMER_NAME : RTEMS.NAME;
141 
142--
143--  This variable is set when the test should stop executing.
144--
145
146   STOP_TEST : RTEMS.BOOLEAN;
147 
148--
149--  EXIT_TEST
150--
151--  DESCRIPTION:
152--
153--  This subprogram is invoked to stop this test.
154--
155 
156   procedure EXIT_TEST;
157
158--
159--  DELAYED_SEND_EVENT
160--
161--  DESCRIPTION:
162--
163--  This subprogram is a timer service routine which sends an
164--  event set to a waiting task.
165--
166 
167   procedure DELAYED_SEND_EVENT (
168      TIMER_ID        : in     RTEMS.ID;
169      IGNORED_ADDRESS : in     RTEMS.ADDRESS
170   );
171
172--
173--  INIT
174--
175--  DESCRIPTION:
176--
177--  This RTEMS task initializes the application.
178--
179
180   procedure INIT (
181      ARGUMENT : in     RTEMS.TASK_ARGUMENT
182   );
183
184--
185--  TEST_TASK
186--
187--  DESCRIPTION:
188--
189--  This is one of the test tasks.
190--
191
192   procedure TEST_TASK (
193      ARGUMENT : in     RTEMS.TASK_ARGUMENT
194   );
195
196--
197--  DELAYED_EVENTS_TASK
198--
199--  DESCRIPTION:
200--
201--  This is one of the test tasks.
202--
203 
204   procedure DELAYED_EVENTS_TASK (
205      ARGUMENT : in     RTEMS.TASK_ARGUMENT
206   );
207
208--
209--  MESSAGE_QUEUE_TASK
210--
211--  DESCRIPTION:
212--
213--  This is one of the test tasks.
214--
215 
216   procedure MESSAGE_QUEUE_TASK (
217      INDEX : in     RTEMS.TASK_ARGUMENT
218   );
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.TASK_ARGUMENT
230   );
231
232--
233--  SEMAPHORE_TASK
234--
235--  DESCRIPTION:
236--
237--  This is one of the test tasks.
238--
239 
240   procedure SEMAPHORE_TASK (
241      ARGUMENT : in     RTEMS.TASK_ARGUMENT
242   );
243
244--
245--  This is the Driver Address Table for this test.
246--
247
248   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
249   (1=>
250      (
251        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
252        RTEMS.NO_DRIVER_ENTRY,                       -- Open
253        RTEMS.NO_DRIVER_ENTRY,                       -- Close
254        RTEMS.NO_DRIVER_ENTRY,                       -- Read
255        RTEMS.NO_DRIVER_ENTRY,                       -- Write
256        RTEMS.NO_DRIVER_ENTRY                        -- Control
257      )
258   );
259
260--
261--  This is the Initialization Tasks Table for this test.
262--
263
264   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
265   (1=>
266     (
267       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
268       2048,                                          -- stack size
269       1,                                             -- priority
270       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
271       MPTEST.INIT'ACCESS,                            -- entry point
272       RTEMS.TIMESLICE,                              -- initial mode
273       0                                              -- argument list
274     )
275   );
276
277----------------------------------------------------------------------------
278----------------------------------------------------------------------------
279--                             BEGIN SUBPACKAGE                           --
280----------------------------------------------------------------------------
281----------------------------------------------------------------------------
282
283   --
284   --  MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
285   --
286   --  DESCRIPTION:
287   --
288   --  This package is the specification for the subpackage
289   --  which will define the per node configuration parameters.
290   --
291   
292   package PER_NODE_CONFIGURATION is
293
294   --
295   --  LOCAL_NODE_NUMBER
296   --
297   --  DESCRIPTION:
298   --
299   --  This function returns the node number for this node.
300   --
301
302      function LOCAL_NODE_NUMBER
303      return RTEMS.UNSIGNED32;
304 
305      pragma INLINE ( LOCAL_NODE_NUMBER );
306
307   end PER_NODE_CONFIGURATION;
308 
309----------------------------------------------------------------------------
310----------------------------------------------------------------------------
311--                              END SUBPACKAGE                            --
312----------------------------------------------------------------------------
313----------------------------------------------------------------------------
314
315--
316--  This is the Multiprocessor Configuration Table for this test.
317--
318
319   MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
320      MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
321      2,                         -- maximum # nodes in system
322      32,                        -- maximum # global objects
323      32                         -- maximum # proxies
324    );
325
326--
327--  This is the Configuration Table for this test.
328--
329
330   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
331      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
332      64 * 1024,                 -- executive RAM size
333      10,                        -- maximum # tasks
334      12,                        -- maximum # timers
335      1,                         -- maximum # semaphores
336      1,                         -- maximum # message queues
337      1,                         -- maximum # messages
338      1,                         -- maximum # partitions
339      0,                         -- maximum # regions
340      0,                         -- maximum # dp memory areas
341      0,                         -- maximum # periods
342      0,                         -- maximum # user extensions
343      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
344      1                          -- # ticks in a timeslice
345  );
346
347end MPTEST;
Note: See TracBrowser for help on using the repository browser.