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