source: rtems/c/src/ada-tests/sptests/spsize/sptest.adb @ 48bfd992

4.104.114.84.95
Last change on this file since 48bfd992 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: 4.0 KB
Line 
1--
2--  SPTEST / BODY
3--
4--  DESCRIPTION:
5--
6--  This package is the implementation of Test 1 of the RTEMS
7--  Single Processor 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 INTERFACES; use INTERFACES;
25with RTEMS;
26with RTEMS_TEST_SUPPORT;
27with TEST_SUPPORT;
28with TEXT_IO;
29with UNSIGNED32_IO;
30
31package body SPTEST is
32
33
34--PAGE
35--
36--  INIT
37--
38
39   procedure INIT (
40      ARGUMENT : in     RTEMS.TASK_ARGUMENT
41   ) is
42      STATUS : RTEMS.STATUS_CODES;
43   begin
44
45      TEXT_IO.NEW_LINE( 2 );
46      TEXT_IO.PUT_LINE( "*** TEST SIZE ***" );
47
48      SPTEST.PUT_SIZE(
49         "Tasks",
50         TRUE,
51         "maximum_tasks",
52         RTEMS_TEST_SUPPORT.PER_TASK
53      );
54
55      SPTEST.PUT_SIZE(
56         "Timers",
57         TRUE,
58         "maximum_timers",
59         RTEMS_TEST_SUPPORT.PER_TIMER
60      );
61
62      SPTEST.PUT_SIZE(
63         "Semaphores",
64         TRUE,
65         "maximum_semaphores",
66         RTEMS_TEST_SUPPORT.PER_SEMAPHORE
67      );
68
69      SPTEST.PUT_SIZE(
70         "Message Queues",
71         TRUE,
72         "maximum_message_queues",
73         RTEMS_TEST_SUPPORT.PER_MESSAGE_QUEUE
74      );
75
76      SPTEST.PUT_SIZE(
77         "Messages",
78         TRUE,
79         "maximum_messages",
80         RTEMS_TEST_SUPPORT.PER_MESSAGE
81      );
82
83      SPTEST.PUT_SIZE(
84         "Regions",
85         TRUE,
86         "maximum_regions",
87         RTEMS_TEST_SUPPORT.PER_REGION
88      );
89
90      SPTEST.PUT_SIZE(
91         "Partitions",
92         TRUE,
93         "maximum_paritions",
94         RTEMS_TEST_SUPPORT.PER_PARTITION
95      );
96
97      SPTEST.PUT_SIZE(
98         "Ports",
99         TRUE,
100         "maximum_ports",
101         RTEMS_TEST_SUPPORT.PER_PORT
102      );
103
104      SPTEST.PUT_SIZE(
105         "Periods",
106         TRUE,
107         "maximum_periods",
108         RTEMS_TEST_SUPPORT.PER_PERIOD
109      );
110
111      SPTEST.PUT_SIZE(
112         "Extensions",
113         TRUE,
114         "maximum_extensions",
115         RTEMS_TEST_SUPPORT.PER_EXTENSION
116      );
117
118      SPTEST.PUT_SIZE(
119         "Device Drivers",
120         TRUE,
121         "number_of_device_drivers",
122         RTEMS_TEST_SUPPORT.PER_DRIVER
123      );
124
125      SPTEST.PUT_SIZE(
126         "System Requirements",
127         FALSE,
128         REQUIREMENT => RTEMS_TEST_SUPPORT.SYSTEM_REQUIREMENTS
129      );
130
131      SPTEST.PUT_SIZE(
132         "Floating Point Tasks",
133         TRUE,
134         "FP attributes",
135         RTEMS_TEST_SUPPORT.PER_FP_TASK
136      );
137
138      TEXT_IO.PUT_LINE( "User's Tasks' Stacks - " );
139      TEXT_IO.NEW_LINE;
140
141      TEXT_IO.PUT_LINE( "Interrupt Stacks - " );
142      TEXT_IO.NEW_LINE;
143
144      SPTEST.PUT_SIZE(
145         "Global object tables",
146         TRUE,
147         "maximum_nodes",
148         RTEMS_TEST_SUPPORT.PER_NODE
149      );
150
151      SPTEST.PUT_SIZE(
152         "Global objects",
153         TRUE,
154         "maximum_global_objects",
155         RTEMS_TEST_SUPPORT.PER_GLOBAL_OBJECT
156      );
157
158      SPTEST.PUT_SIZE(
159         "Proxies",
160         TRUE,
161         "maximum_proxies",
162         RTEMS_TEST_SUPPORT.PER_PROXY
163      );
164
165      TEXT_IO.PUT_LINE( "*** END OF TEST SIZE ***" );
166      RTEMS.SHUTDOWN_EXECUTIVE( 0 );
167
168   end INIT;
169
170--PAGE
171--
172--  PUT_SIZE
173--
174
175   procedure PUT_SIZE (
176      DESCRIPTION    : in     STRING;
177      HAS_FIELD_NAME : in     BOOLEAN;
178      FIELD_NAME     : in     STRING             := "";
179      REQUIREMENT    : in     RTEMS.UNSIGNED32   := 0
180   ) is
181      SPACES : constant STRING := "                              ";
182   begin
183
184      -- 21 is length of longest description (task's stacks)
185
186      TEXT_IO.PUT( DESCRIPTION );
187      TEXT_IO.PUT( SPACES( 1 .. 21 - DESCRIPTION'LENGTH ) );
188      TEXT_IO.PUT( " - " );
189      if HAS_FIELD_NAME = TRUE then
190         TEXT_IO.PUT( FIELD_NAME );
191         TEXT_IO.PUT( " * " );
192      end if;
193      UNSIGNED32_IO.PUT( REQUIREMENT );
194      TEXT_IO.NEW_LINE;
195
196  end PUT_SIZE;
197   
198
199end SPTEST;
Note: See TracBrowser for help on using the repository browser.