Warning, /testsuites/ada/sptests/sp09/sptest.ads is written in an unsupported language. File is not indexed.
0001 -- SPDX-License-Identifier: BSD-2-Clause
0002
0003 --
0004 -- SPTEST / SPECIFICATION
0005 --
0006 -- DESCRIPTION:
0007 --
0008 -- This package is the specification for Test 9 of the RTEMS
0009 -- Single Processor Test Suite.
0010 --
0011 -- DEPENDENCIES:
0012 --
0013 --
0014 --
0015 -- COPYRIGHT (c) 1989-2011.
0016 -- On-Line Applications Research Corporation (OAR).
0017 --
0018 -- Redistribution and use in source and binary forms, with or without
0019 -- modification, are permitted provided that the following conditions
0020 -- are met:
0021 -- 1. Redistributions of source code must retain the above copyright
0022 -- notice, this list of conditions and the following disclaimer.
0023 -- 2. Redistributions in binary form must reproduce the above copyright
0024 -- notice, this list of conditions and the following disclaimer in the
0025 -- documentation and/or other materials provided with the distribution.
0026 --
0027 -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0028 -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0029 -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0030 -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0031 -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0032 -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0033 -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0034 -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0035 -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0036 -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0037 -- POSSIBILITY OF SUCH DAMAGE.
0038 --
0039
0040 with RTEMS;
0041 with RTEMS.TASKS;
0042 with SYSTEM;
0043 with System.Storage_Elements;
0044
0045 package SPTEST is
0046
0047 --
0048 -- Buffer Record similar to that used by RTEMS 3.2.1. Using this
0049 -- avoids changes to the test.
0050 --
0051
0052 type BUFFER is
0053 record
0054 FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
0055 FIELD2 : RTEMS.UNSIGNED32;
0056 FIELD3 : RTEMS.UNSIGNED32;
0057 FIELD4 : RTEMS.UNSIGNED32;
0058 end record;
0059
0060 --
0061 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0062 -- by this test.
0063 --
0064
0065 TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.ID;
0066 TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.NAME;
0067
0068 --
0069 -- These arrays contain the IDs and NAMEs of all RTEMS timers created
0070 -- by this test.
0071 --
0072
0073 TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
0074 TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
0075
0076 --
0077 -- These arrays contain the IDs and NAMEs of all RTEMS semaphores created
0078 -- by this test.
0079 --
0080
0081 SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
0082 SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
0083
0084 --
0085 -- These arrays contain the IDs and NAMEs of all RTEMS message queues
0086 -- created by this test.
0087 --
0088
0089 QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
0090 QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
0091
0092 --
0093 -- These arrays contain the IDs and NAMEs of all RTEMS partitions created
0094 -- by this test.
0095 --
0096
0097 PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
0098 PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
0099
0100 --
0101 -- These arrays contain the IDs and NAMEs of all RTEMS regions created
0102 -- by this test.
0103 --
0104
0105 REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
0106 REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
0107
0108 --
0109 -- These arrays contain the IDs and NAMEs of all RTEMS ports created
0110 -- by this test.
0111 --
0112
0113 PORT_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
0114 PORT_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
0115
0116 --
0117 -- These arrays contain the IDs and NAMEs of all RTEMS periods created
0118 -- by this test.
0119 --
0120
0121 PERIOD_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
0122 PERIOD_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
0123
0124 --
0125 -- This variable is used as the output ID on directives which return
0126 -- an ID but are invoked in a manner which returns a non-SUCCESSFUL
0127 -- status code.
0128 --
0129
0130 JUNK_ID : RTEMS.ID;
0131
0132 --
0133 -- The following area defines a memory area to be used as the
0134 -- internal address space of the port.
0135 --
0136
0137 INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
0138 System.Storage_Elements.To_Address(16#00001000#);
0139
0140 INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
0141 of RTEMS.UNSIGNED8;
0142 for INTERNAL_PORT_AREA'Address use INTERNAL_PORT_AREA_ADDRESS;
0143
0144 --
0145 -- The following area defines a memory area to be used as the
0146 -- external address space of the port.
0147 --
0148
0149 EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
0150 System.Storage_Elements.To_Address(16#00002000#);
0151
0152 EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
0153 of RTEMS.UNSIGNED8;
0154 for EXTERNAL_PORT_AREA'Address use EXTERNAL_PORT_AREA_ADDRESS;
0155
0156 --
0157 -- The following area defines a memory area to be used as the
0158 -- memory space for a partition.
0159 --
0160
0161 PARTITION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
0162 of RTEMS.UNSIGNED8;
0163 for PARTITION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
0164
0165 --
0166 -- The following area defines a memory area to be used as the
0167 -- memory space for a partition which starts at an invalid address.
0168 --
0169
0170 PARTITION_BAD_AREA_ADDRESS : constant System.Address :=
0171 System.Storage_Elements.To_Address(16#00000006#);
0172
0173 PARTITION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
0174 of RTEMS.UNSIGNED8;
0175 for PARTITION_BAD_AREA'Address use PARTITION_BAD_AREA_ADDRESS;
0176
0177 --
0178 -- The following area defines a memory area to be used as the
0179 -- memory space for a region and constants used to define the regions
0180 -- starting area and length.
0181 --
0182
0183 REGION_GOOD_AREA : array ( RTEMS.Size range 0 .. 4095 )
0184 of RTEMS.Size;
0185 for REGION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
0186
0187 REGION_START_OFFSET : constant RTEMS.Size := 2048;
0188 REGION_LENGTH : constant RTEMS.Size := 512;
0189
0190 --
0191 -- The following area defines a memory area to be used as the
0192 -- memory space for a region which starts at an invalid address.
0193 --
0194
0195 REGION_BAD_AREA_ADDRESS : constant System.Address :=
0196 System.Storage_Elements.To_Address(16#00000000#);
0197
0198 REGION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
0199 of RTEMS.UNSIGNED8;
0200 for REGION_BAD_AREA'Address use REGION_BAD_AREA_ADDRESS;
0201
0202 --
0203 -- INIT
0204 --
0205 -- DESCRIPTION:
0206 --
0207 -- This RTEMS task initializes the application.
0208 --
0209
0210 procedure INIT (
0211 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0212 );
0213 pragma Convention (C, INIT);
0214
0215 --
0216 -- DELAYED_SUBPROGRAM
0217 --
0218 -- DESCRIPTION:
0219 --
0220 -- This subprogram is scheduled as a timer service routine.
0221 -- It performs no actions if it fires.
0222 --
0223
0224 procedure DELAYED_SUBPROGRAM (
0225 IGNORED_ID : in RTEMS.ID;
0226 IGNORED_ADDRESS : in RTEMS.ADDRESS
0227 );
0228 pragma Convention (C, DELAYED_SUBPROGRAM);
0229
0230 --
0231 -- TASK_1
0232 --
0233 -- DESCRIPTION:
0234 --
0235 -- This RTEMS task tests numerous error conditions.
0236 --
0237
0238 procedure TASK_1 (
0239 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0240 );
0241 pragma Convention (C, TASK_1);
0242
0243 --
0244 -- TASK_2
0245 --
0246 -- DESCRIPTION:
0247 --
0248 -- This RTEMS task tests numerous error conditions.
0249 --
0250
0251 procedure TASK_2 (
0252 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0253 );
0254 pragma Convention (C, TASK_2);
0255
0256 --
0257 -- TASK_3
0258 --
0259 -- DESCRIPTION:
0260 --
0261 -- This RTEMS task tests numerous error conditions.
0262 --
0263
0264 procedure TASK_3 (
0265 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0266 );
0267 pragma Convention (C, TASK_3);
0268
0269 --
0270 -- TASK_4
0271 --
0272 -- DESCRIPTION:
0273 --
0274 -- This RTEMS task tests numerous error conditions.
0275 --
0276
0277 procedure TASK_4 (
0278 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0279 );
0280 pragma Convention (C, TASK_4);
0281
0282 --
0283 -- SCREEN_1
0284 --
0285 -- DESCRIPTION:
0286 --
0287 -- This subprogram processes the a single output screen of this test.
0288 --
0289
0290 procedure SCREEN_1;
0291
0292 --
0293 -- SCREEN_2
0294 --
0295 -- DESCRIPTION:
0296 --
0297 -- This subprogram processes the a single output screen of this test.
0298 --
0299
0300 procedure SCREEN_2;
0301
0302 --
0303 -- SCREEN_3
0304 --
0305 -- DESCRIPTION:
0306 --
0307 -- This subprogram processes the a single output screen of this test.
0308 --
0309
0310 procedure SCREEN_3;
0311
0312 --
0313 -- SCREEN_4
0314 --
0315 -- DESCRIPTION:
0316 --
0317 -- This subprogram processes the a single output screen of this test.
0318 --
0319
0320 procedure SCREEN_4;
0321
0322 --
0323 -- SCREEN_5
0324 --
0325 -- DESCRIPTION:
0326 --
0327 -- This subprogram processes the a single output screen of this test.
0328 --
0329
0330 procedure SCREEN_5;
0331
0332 --
0333 -- SCREEN_6
0334 --
0335 -- DESCRIPTION:
0336 --
0337 -- This subprogram processes the a single output screen of this test.
0338 --
0339
0340 procedure SCREEN_6;
0341
0342 --
0343 -- SCREEN_7
0344 --
0345 -- DESCRIPTION:
0346 --
0347 -- This subprogram processes the a single output screen of this test.
0348 --
0349
0350 procedure SCREEN_7;
0351
0352 --
0353 -- SCREEN_8
0354 --
0355 -- DESCRIPTION:
0356 --
0357 -- This subprogram processes the a single output screen of this test.
0358 --
0359
0360 procedure SCREEN_8;
0361
0362 --
0363 -- SCREEN_9
0364 --
0365 -- DESCRIPTION:
0366 --
0367 -- This subprogram processes the a single output screen of this test.
0368 --
0369
0370 procedure SCREEN_9;
0371
0372 --
0373 -- SCREEN_10
0374 --
0375 -- DESCRIPTION:
0376 --
0377 -- This subprogram processes the a single output screen of this test.
0378 --
0379
0380 procedure SCREEN_10;
0381
0382 --
0383 -- SCREEN_11
0384 --
0385 -- DESCRIPTION:
0386 --
0387 -- This subprogram processes the a single output screen of this test.
0388 --
0389
0390 procedure SCREEN_11;
0391
0392 --
0393 -- SCREEN_12
0394 --
0395 -- DESCRIPTION:
0396 --
0397 -- This subprogram processes the a single output screen of this test.
0398 --
0399
0400 procedure SCREEN_12;
0401
0402 --
0403 -- SCREEN_13
0404 --
0405 -- DESCRIPTION:
0406 --
0407 -- This subprogram processes the a single output screen of this test.
0408 --
0409
0410 procedure SCREEN_13;
0411
0412 end SPTEST;