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

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