Warning, /testsuites/ada/mptests/mp14/mptest.ads is written in an unsupported language. File is not indexed.
0001 -- SPDX-License-Identifier: BSD-2-Clause
0002
0003 --
0004 -- MPTEST / SPECIFICATION
0005 --
0006 -- DESCRIPTION:
0007 --
0008 -- This package is the specification for Test 14 of the RTEMS
0009 -- Multiprocessor 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
0043 package MPTEST is
0044
0045 --
0046 -- Buffer Record similar to that used by RTEMS 3.2.1. Using this
0047 -- avoids changes to the test.
0048 --
0049
0050 type BUFFER is
0051 record
0052 FIELD1 : aliased RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
0053 FIELD2 : aliased RTEMS.UNSIGNED32;
0054 FIELD3 : aliased RTEMS.UNSIGNED32;
0055 FIELD4 : aliased RTEMS.UNSIGNED32;
0056 end record;
0057
0058 --
0059 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0060 -- by this test for passing event sets.
0061 --
0062
0063 TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0064 TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0065 --
0066 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0067 -- by this test for passing event sets.
0068 --
0069
0070 EVENT_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0071 EVENT_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0072
0073 --
0074 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0075 -- by this test for manipulating semaphores.
0076 --
0077
0078 SEMAPHORE_TASK_ID :
0079 array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0080 SEMAPHORE_TASK_NAME :
0081 array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0082
0083 --
0084 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0085 -- by this test for passing messages.
0086 --
0087
0088 QUEUE_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0089 QUEUE_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0090
0091 --
0092 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0093 -- by this test for manipulating the global partitions.
0094 --
0095
0096 PARTITION_TASK_ID :
0097 array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0098 PARTITION_TASK_NAME :
0099 array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0100
0101 --
0102 -- These arrays contain the IDs and NAMEs of all RTEMS partitions
0103 -- created by this test.
0104 --
0105
0106 PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0107 PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0108
0109 --
0110 -- These arrays contain the IDs and NAMEs of all RTEMS semaphores
0111 -- created by this test.
0112 --
0113
0114 SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0115 SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0116
0117 --
0118 -- These arrays contain the IDs and NAMEs of all RTEMS message_queues
0119 -- created by this test.
0120 --
0121
0122 QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0123 QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0124
0125 --
0126 --
0127 -- These arrays contain the IDs and NAMEs of all RTEMS timers
0128 -- created by this test.
0129 --
0130
0131 TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
0132 TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
0133
0134 --
0135 -- The following are message buffers used to contain the test messages
0136 -- and pointers to those buffers.
0137 --
0138
0139 BUFFER_AREAS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of MPTEST.BUFFER;
0140 BUFFERS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ADDRESS;
0141
0142 --
0143 -- This is the area used for the partition.
0144 --
0145
0146 PARTITION_AREA :
0147 array ( RTEMS.UNSIGNED32 range 0 .. 16#7FFF# ) of RTEMS.UNSIGNED8;
0148 for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
0149
0150 --
0151 -- The following constants control the flow of "dot" indicators
0152 -- from the various test componenents.
0153 --
0154
0155 EVENT_TASK_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100;
0156 EVENT_SEND_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100;
0157 DELAYED_EVENT_DOT_COUNT : constant RTEMS.UNSIGNED32 := 1000;
0158 MESSAGE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
0159 PARTITION_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
0160 SEMAPHORE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
0161
0162 --
0163 -- These contain the IDs and NAMEs of the RTEMS timers used
0164 -- by this test to stop.
0165 --
0166
0167 STOP_TIMER_ID : RTEMS.ID;
0168 STOP_TIMER_NAME : RTEMS.NAME;
0169
0170 --
0171 -- This variable is set when the test should stop executing.
0172 --
0173
0174 STOP_TEST : BOOLEAN;
0175
0176 --
0177 -- EXIT_TEST
0178 --
0179 -- DESCRIPTION:
0180 --
0181 -- This subprogram is invoked to stop this test.
0182 --
0183
0184 procedure EXIT_TEST;
0185
0186 --
0187 -- DELAYED_SEND_EVENT
0188 --
0189 -- DESCRIPTION:
0190 --
0191 -- This subprogram is a timer service routine which sends an
0192 -- event set to a waiting task.
0193 --
0194
0195 procedure DELAYED_SEND_EVENT (
0196 TIMER_ID : in RTEMS.ID;
0197 IGNORED_ADDRESS : in RTEMS.ADDRESS
0198 );
0199 pragma Convention (C, DELAYED_SEND_EVENT);
0200
0201 procedure STOP_TEST_TSR (
0202 IGNORED_ID : in RTEMS.ID;
0203 IGNORED_ADDRESS : in RTEMS.ADDRESS
0204 );
0205 pragma Convention (C, STOP_TEST_TSR);
0206
0207 --
0208 -- INIT
0209 --
0210 -- DESCRIPTION:
0211 --
0212 -- This RTEMS task initializes the application.
0213 --
0214
0215 procedure INIT (
0216 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0217 );
0218 pragma Convention (C, INIT);
0219
0220 --
0221 -- TEST_TASK
0222 --
0223 -- DESCRIPTION:
0224 --
0225 -- This is one of the test tasks.
0226 --
0227
0228 procedure TEST_TASK (
0229 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0230 );
0231 pragma Convention (C, TEST_TASK);
0232
0233 --
0234 -- DELAYED_EVENTS_TASK
0235 --
0236 -- DESCRIPTION:
0237 --
0238 -- This is one of the test tasks.
0239 --
0240
0241 procedure DELAYED_EVENTS_TASK (
0242 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0243 );
0244 pragma Convention (C, DELAYED_EVENTS_TASK);
0245
0246 --
0247 -- MESSAGE_QUEUE_TASK
0248 --
0249 -- DESCRIPTION:
0250 --
0251 -- This is one of the test tasks.
0252 --
0253
0254 procedure MESSAGE_QUEUE_TASK (
0255 INDEX : in RTEMS.TASKS.ARGUMENT
0256 );
0257 pragma Convention (C, MESSAGE_QUEUE_TASK);
0258
0259 --
0260 -- PARTITION_TASK
0261 --
0262 -- DESCRIPTION:
0263 --
0264 -- This is one of the test tasks.
0265 --
0266
0267 procedure PARTITION_TASK (
0268 IGNORED : in RTEMS.TASKS.ARGUMENT
0269 );
0270 pragma Convention (C, PARTITION_TASK);
0271
0272 --
0273 -- SEMAPHORE_TASK
0274 --
0275 -- DESCRIPTION:
0276 --
0277 -- This is one of the test tasks.
0278 --
0279
0280 procedure SEMAPHORE_TASK (
0281 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0282 );
0283 pragma Convention (C, SEMAPHORE_TASK);
0284
0285 end MPTEST;