Warning, /testsuites/ada/tmtests/tm20/tmtest.ads is written in an unsupported language. File is not indexed.
0001 -- SPDX-License-Identifier: BSD-2-Clause
0002
0003 --
0004 -- TMTEST / SPECIFICATION
0005 --
0006 -- DESCRIPTION:
0007 --
0008 -- This package is the specification for Test 20 of the RTEMS
0009 -- Timing 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 TIME_TEST_SUPPORT;
0041 with RTEMS;
0042 with RTEMS.TASKS;
0043
0044 package TMTEST is
0045
0046 --
0047 -- These arrays contain the IDs and NAMEs of all RTEMS tasks created
0048 -- by this test.
0049 --
0050
0051 TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
0052 TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
0053
0054 --
0055 -- These following are the ID and NAME of the RTEMS partition created
0056 -- by this test.
0057 --
0058
0059 PARTITION_ID : RTEMS.ID;
0060 PARTITION_NAME : RTEMS.NAME;
0061
0062 --
0063 -- These following are the ID and NAME of the RTEMS region created
0064 -- by this test.
0065 --
0066
0067 REGION_ID : RTEMS.ID;
0068 REGION_NAME : RTEMS.NAME;
0069
0070 --
0071 -- The following area defines a memory area to be used as the
0072 -- memory space for a partition.
0073 --
0074
0075 PARTITION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
0076 of RTEMS.UNSIGNED8;
0077 for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
0078
0079 --
0080 -- The following area defines a memory area to be used as the
0081 -- memory space for a region.
0082 --
0083
0084 REGION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
0085 of RTEMS.UNSIGNED8;
0086
0087 for REGION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
0088
0089 --
0090 -- The following are the buffers allocated from the region.
0091 --
0092
0093 BUFFER_ADDRESS_1 : RTEMS.ADDRESS;
0094 BUFFER_ADDRESS_2 : RTEMS.ADDRESS;
0095 BUFFER_ADDRESS_3 : RTEMS.ADDRESS;
0096 BUFFER_ADDRESS_4 : RTEMS.ADDRESS;
0097
0098 BUFFER_ADDRESSES : array ( RTEMS.UNSIGNED32
0099 range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ADDRESS;
0100
0101 --
0102 -- The following variable is set to the execution time returned
0103 -- by the timer.
0104 --
0105
0106 END_TIME : RTEMS.UNSIGNED32;
0107
0108 --
0109 -- INIT
0110 --
0111 -- DESCRIPTION:
0112 --
0113 -- This RTEMS task initializes the application.
0114 --
0115
0116 procedure INIT (
0117 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0118 );
0119 pragma Convention (C, INIT);
0120
0121 --
0122 -- TASK_1
0123 --
0124 -- DESCRIPTION:
0125 --
0126 -- This RTEMS task is responsible for measuring and reporting
0127 -- the following execution times:
0128 --
0129 -- + PARTITION_CREATE
0130 -- + REGION_CREATE
0131 -- + PARTITION_GET_BUFFER with a buffer available
0132 -- + PARTITION_GET_BUFFER with no buffers available
0133 -- + PARTITION_RETURN_BUFFER
0134 -- + PARTITION_DELETE
0135 -- + REGION_GET_SEGMENT with a segment available
0136 -- + REGION_GET_SEGMENT with the NO_WAIT option
0137 -- + REGION_RETURN_SEGMENT with no tasks waiting for memory
0138 -- + REGION_RETURN_SEGMENT preemptive
0139 -- + REGION_DELETE
0140 -- + IO_INITIALIZE
0141 -- + IO_OPEN
0142 -- + IO_CLOSE
0143 -- + IO_READ
0144 -- + IO_WRITE
0145 -- + IO_CONTROL
0146 --
0147
0148 procedure TASK_1 (
0149 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0150 );
0151 pragma Convention (C, TASK_1);
0152
0153 --
0154 -- TASK_2
0155 --
0156 -- DESCRIPTION:
0157 --
0158 -- This RTEMS task is responsible for measuring and reporting
0159 -- the following execution times:
0160 --
0161 -- + blocking REGION_GET_SEGMENT
0162 -- + REGION_RETURN_SEGMENT which readies a task
0163 --
0164
0165 procedure TASK_2 (
0166 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0167 );
0168 pragma Convention (C, TASK_2);
0169
0170 end TMTEST;