source: rtems/c/src/ada-tests/mptests/mp03/mptest.ads @ 9917d5da

4.104.114.84.95
Last change on this file since 9917d5da was bf9ae83, checked in by Joel Sherrill <joel.sherrill@…>, on 06/02/97 at 20:32:11

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: 5.9 KB
Line 
1--
2--  MPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 3 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 contains the ID of the remote task with which this
48--  test interacts.
49--
50
51   REMOTE_TID  : RTEMS.ID;
52
53--
54--  This variable contains the node on which the remote task with which
55--  this test interacts resides.
56--
57
58   REMOTE_NODE : RTEMS.UNSIGNED32;
59
60--
61--  INIT
62--
63--  DESCRIPTION:
64--
65--  This RTEMS task initializes the application.
66--
67
68   procedure INIT (
69      ARGUMENT : in     RTEMS.TASK_ARGUMENT
70   );
71
72--
73--  DELAYED_SEND_EVENT
74--
75--  DESCRIPTION:
76--
77--  This subprogram is a timer service routine which sends an
78--  event set to a waiting task.
79--
80
81   procedure DELAYED_SEND_EVENT (
82      IGNORED_ID      : in     RTEMS.ID; 
83      IGNORED_ADDRESS : in     RTEMS.ADDRESS
84   );
85
86--
87--  TEST_TASK
88--
89--  DESCRIPTION:
90--
91--  This is the body of the RTEMS tasks which constitute this test.
92--
93
94   procedure TEST_TASK (
95      ARGUMENT : in     RTEMS.TASK_ARGUMENT
96   );
97
98--
99--  TEST_TASK_SUPPORT
100--
101--  DESCRIPTION:
102--
103--  This subprogram performs the bulk of the test.  Based on the NODE
104--  specified, this subprogram loops suspending/resuming a remote task
105--  or waiting for itself to be suspended/resumed.
106--
107
108   procedure TEST_TASK_SUPPORT (
109      NODE : in     RTEMS.UNSIGNED32
110   );
111
112--
113--  This is the Driver Address Table for this test.
114--
115
116   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
117   (1=>
118      (
119        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
120        RTEMS.NO_DRIVER_ENTRY,                       -- Open
121        RTEMS.NO_DRIVER_ENTRY,                       -- Close
122        RTEMS.NO_DRIVER_ENTRY,                       -- Read
123        RTEMS.NO_DRIVER_ENTRY,                       -- Write
124        RTEMS.NO_DRIVER_ENTRY                        -- Control
125      )
126   );
127
128--
129--  This is the Initialization Tasks Table for this test.
130--
131
132   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
133   (1=>
134     (
135       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
136       2048,                                          -- stack size
137       1,                                             -- priority
138       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
139       MPTEST.INIT'ACCESS,                            -- entry point
140       RTEMS.NO_PREEMPT,                              -- initial mode
141       0                                              -- argument list
142     )
143   );
144
145----------------------------------------------------------------------------
146----------------------------------------------------------------------------
147--                             BEGIN SUBPACKAGE                           --
148----------------------------------------------------------------------------
149----------------------------------------------------------------------------
150
151   --
152   --  MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
153   --
154   --  DESCRIPTION:
155   --
156   --  This package is the specification for the subpackage
157   --  which will define the per node configuration parameters.
158   --
159   
160   package PER_NODE_CONFIGURATION is
161
162   --
163   --  LOCAL_NODE_NUMBER
164   --
165   --  DESCRIPTION:
166   --
167   --  This function returns the node number for this node.
168   --
169
170      function LOCAL_NODE_NUMBER
171      return RTEMS.UNSIGNED32;
172 
173      pragma INLINE ( LOCAL_NODE_NUMBER );
174
175   end PER_NODE_CONFIGURATION;
176 
177----------------------------------------------------------------------------
178----------------------------------------------------------------------------
179--                              END SUBPACKAGE                            --
180----------------------------------------------------------------------------
181----------------------------------------------------------------------------
182
183--
184--  This is the Multiprocessor Configuration Table for this test.
185--
186
187   MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
188      MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
189      2,                         -- maximum # nodes in system
190      32,                        -- maximum # global objects
191      32                         -- maximum # proxies
192    );
193
194--
195--  This is the Configuration Table for this test.
196--
197
198   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
199      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
200      64 * 1024,                 -- executive RAM size
201      10,                        -- maximum # tasks
202      1,                         -- maximum # timers
203      0,                         -- maximum # semaphores
204      0,                         -- maximum # message queues
205      0,                         -- maximum # messages
206      0,                         -- maximum # partitions
207      0,                         -- maximum # regions
208      0,                         -- maximum # dp memory areas
209      0,                         -- maximum # periods
210      0,                         -- maximum # user extensions
211      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
212      50                         -- # ticks in a timeslice
213  );
214
215end MPTEST;
Note: See TracBrowser for help on using the repository browser.