source: rtems/c/src/ada-tests/mptests/mp05/mptest.ads @ bf9ae83

4.104.114.84.95
Last change on this file since bf9ae83 was bf9ae83, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 2, 1997 at 8:32:11 PM

modified copyright notice to be the same as RTEMS 4.0.0.

changed the CVS ID string to be a "development" version.

  • Property mode set to 100644
File size: 6.4 KB
Line 
1--
2--  MPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 5 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 CLOCK_DRIVER;
25with BSP_MPCI;
26with RTEMS;
27
28package MPTEST is
29
30--
31--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
32--  by this test.
33--
34
35   TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
36   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
37
38--
39--  These arrays contain the IDs and NAMEs of all RTEMS timers created
40--  by this test.
41--
42
43   TIMER_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
44   TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
45
46--
47--  This variable is set when the test should stop executing.
48--
49   STOP_TEST : RTEMS.BOOLEAN;
50
51--
52--  This variable contains the ID of the remote task with which this
53--  test interacts.
54--
55
56   REMOTE_TID  : RTEMS.ID;
57
58--
59--  This variable contains the node on which the remote task with which
60--  this test interacts resides.
61--
62
63   REMOTE_NODE : RTEMS.UNSIGNED32;
64
65--
66--  This is the signal set which is sent to the task on the other node.
67--
68
69   REMOTE_SIGNAL : RTEMS.SIGNAL_SET;
70
71--
72--  This is the signal set the task on this node expects to receive
73--  from the other node.
74--
75
76   EXPECTED_SIGNAL : RTEMS.SIGNAL_SET;
77
78--
79--  These keep track of if a signal set has been caught and how many
80--  signal sets have been caught cumulative.
81--
82
83   SIGNAL_CAUGHT : RTEMS.BOOLEAN;
84   SIGNAL_COUNT  : RTEMS.UNSIGNED32;
85
86--
87--  The number of signals to process per dot printed out.
88--
89
90   SIGNALS_PER_DOT : constant RTEMS.UNSIGNED32 := 15;
91
92--
93--  INIT
94--
95--  DESCRIPTION:
96--
97--  This RTEMS task initializes the application.
98--
99
100   procedure INIT (
101      ARGUMENT : in     RTEMS.TASK_ARGUMENT
102   );
103
104--
105--  PROCESS_ASR
106--
107--  DESCRIPTION:
108--
109--  This subprogram is an ASR for TEST_TASK.
110--
111
112   procedure PROCESS_ASR (
113      SIGNAL : in     RTEMS.SIGNAL_SET
114   );
115
116--
117--  STOP_TEST_TSR
118--
119--  DESCRIPTION:
120--
121--  This subprogram is a TSR which sets the "stop test" flag.
122--
123 
124   procedure STOP_TEST_TSR (
125      IGNORED_ID      : in     RTEMS.ID;
126      IGNORED_ADDRESS : in     RTEMS.ADDRESS
127   );
128
129--
130--  TEST_TASK
131--
132--  DESCRIPTION:
133--
134--  This is the body of the RTEMS tasks which constitute this test.
135--
136
137   procedure TEST_TASK (
138      ARGUMENT : in     RTEMS.TASK_ARGUMENT
139   );
140
141--
142--  This is the Driver Address Table for this test.
143--
144
145   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
146   (1=>
147      (
148        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
149        RTEMS.NO_DRIVER_ENTRY,                       -- Open
150        RTEMS.NO_DRIVER_ENTRY,                       -- Close
151        RTEMS.NO_DRIVER_ENTRY,                       -- Read
152        RTEMS.NO_DRIVER_ENTRY,                       -- Write
153        RTEMS.NO_DRIVER_ENTRY                        -- Control
154      )
155   );
156
157--
158--  This is the Initialization Tasks Table for this test.
159--
160
161   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := 
162   (1=>
163     (
164       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
165       2048,                                          -- stack size
166       1,                                             -- priority
167       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
168       MPTEST.INIT'ACCESS,                            -- entry point
169       RTEMS.NO_PREEMPT,                              -- initial mode
170       0                                              -- argument list
171     )
172   );
173
174----------------------------------------------------------------------------
175----------------------------------------------------------------------------
176--                             BEGIN SUBPACKAGE                           --
177----------------------------------------------------------------------------
178----------------------------------------------------------------------------
179
180   --
181   --  MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
182   --
183   --  DESCRIPTION:
184   --
185   --  This package is the specification for the subpackage
186   --  which will define the per node configuration parameters.
187   --
188   
189   package PER_NODE_CONFIGURATION is
190
191   --
192   --  LOCAL_NODE_NUMBER
193   --
194   --  DESCRIPTION:
195   --
196   --  This function returns the node number for this node.
197   --
198
199      function LOCAL_NODE_NUMBER 
200      return RTEMS.UNSIGNED32;
201 
202      pragma INLINE ( LOCAL_NODE_NUMBER );
203
204   end PER_NODE_CONFIGURATION;
205 
206----------------------------------------------------------------------------
207----------------------------------------------------------------------------
208--                              END SUBPACKAGE                            --
209----------------------------------------------------------------------------
210----------------------------------------------------------------------------
211
212--
213--  This is the Multiprocessor Configuration Table for this test.
214--
215
216   MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
217      MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
218      2,                         -- maximum # nodes in system
219      32,                        -- maximum # global objects
220      32                         -- maximum # proxies
221    );
222
223--
224--  This is the Configuration Table for this test.
225--
226
227   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
228      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
229      64 * 1024,                 -- executive RAM size
230      10,                        -- maximum # tasks
231      1,                         -- maximum # timers
232      2,                         -- maximum # semaphores
233      0,                         -- maximum # message queues
234      0,                         -- maximum # messages
235      0,                         -- maximum # partitions
236      0,                         -- maximum # regions
237      0,                         -- maximum # dp memory areas
238      0,                         -- maximum # periods
239      0,                         -- maximum # user extensions
240      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
241      50                         -- # ticks in a timeslice
242  );
243
244end MPTEST;
Note: See TracBrowser for help on using the repository browser.