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

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