Warning, /testsuites/ada/tmtests/tm19/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 19 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 RTEMS;
0041 with RTEMS.TASKS;
0042
0043 package TMTEST is
0044
0045 --
0046 -- This array contains the IDs of all RTEMS tasks created by this test.
0047 --
0048
0049 TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
0050
0051 --
0052 -- The following variable is set to the execution time returned
0053 -- by the timer.
0054 --
0055
0056 END_TIME : RTEMS.UNSIGNED32;
0057
0058 --
0059 -- INIT
0060 --
0061 -- DESCRIPTION:
0062 --
0063 -- This RTEMS task initializes the application.
0064 --
0065
0066 procedure INIT (
0067 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0068 );
0069 pragma Convention (C, INIT);
0070
0071 --
0072 -- PROCESS_ASR_FOR_PASS_1
0073 --
0074 -- DESCRIPTION:
0075 --
0076 -- This subprogram is the ASR used to measure and report the
0077 -- execution time of a SIGNAL_SEND to SELF. Before it exits
0078 -- it starts the timer so that the execution time required to
0079 -- exit from an ASR back to the same task can be measured.
0080 --
0081
0082 procedure PROCESS_ASR_FOR_PASS_1 (
0083 SIGNALS : in RTEMS.SIGNAL_SET
0084 );
0085 pragma Convention (C, PROCESS_ASR_FOR_PASS_1);
0086
0087 --
0088 -- PROCESS_ASR_FOR_PASS_2
0089 --
0090 -- DESCRIPTION:
0091 --
0092 -- This subprogram is the ASR which sets up for a preemptive
0093 -- return from an ASR. Before it exits it starts the timer
0094 -- so that the execution time required to exit from an ASR
0095 -- and transfer control to the another task can be measured.
0096 --
0097
0098 procedure PROCESS_ASR_FOR_PASS_2 (
0099 SIGNALS : in RTEMS.SIGNAL_SET
0100 );
0101 pragma Convention (C, PROCESS_ASR_FOR_PASS_2);
0102
0103 --
0104 -- TASK_1
0105 --
0106 -- DESCRIPTION:
0107 --
0108 -- This RTEMS task is responsible for measuring and reporting
0109 -- the following execution times:
0110 --
0111 -- + SIGNAL_CATCH
0112 -- + non-preemptive SIGNAL_SEND
0113 -- + non-preemptive return from an ASR
0114 --
0115
0116 procedure TASK_1 (
0117 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0118 );
0119 pragma Convention (C, TASK_1);
0120
0121 --
0122 -- PROCESS_ASR_FOR_TASK_2
0123 --
0124 -- DESCRIPTION:
0125 --
0126 -- This subprogram is the ASR for TASK_2. It performs no actions.
0127 --
0128
0129 procedure PROCESS_ASR_FOR_TASK_2 (
0130 SIGNALS : in RTEMS.SIGNAL_SET
0131 );
0132 pragma Convention (C, PROCESS_ASR_FOR_TASK_2);
0133
0134 --
0135 -- TASK_2
0136 --
0137 -- DESCRIPTION:
0138 --
0139 -- This RTEMS task is used as the recipient of a SIGNAL_SEND.
0140 -- After establishing an ASR, it suspends itself to insure
0141 -- that it does not execute again.
0142 --
0143
0144 procedure TASK_2 (
0145 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0146 );
0147 pragma Convention (C, TASK_2);
0148
0149 --
0150 -- TASK_3
0151 --
0152 -- DESCRIPTION:
0153 --
0154 -- This RTEMS task is used as the recipient of a preemptive
0155 -- SIGNAL_SEND. This task suspends itself and is resumed by
0156 -- an ASR for TASK_1. Once the task executes, it stops the
0157 -- timer and reports the execution time for a preemptive
0158 -- return from an ASR.
0159 --
0160
0161 procedure TASK_3 (
0162 ARGUMENT : in RTEMS.TASKS.ARGUMENT
0163 );
0164 pragma Convention (C, TASK_3);
0165
0166 end TMTEST;