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

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