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

4.104.114.84.95
Last change on this file since a846105 was 190f5c23, checked in by Joel Sherrill <joel.sherrill@…>, on 08/26/02 at 14:27:21

2002-08-26 Joel Sherrill <joel@…>

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