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

4.104.114.84.95
Last change on this file since 35e4691 was 35e4691, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:50:41

2003-09-04 Joel Sherrill <joel@…>

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