1 | -- SPDX-License-Identifier: BSD-2-Clause |
---|
2 | |
---|
3 | -- |
---|
4 | -- SPTEST / SPECIFICATION |
---|
5 | -- |
---|
6 | -- DESCRIPTION: |
---|
7 | -- |
---|
8 | -- This package is the specification for Test 19 of the RTEMS |
---|
9 | -- Single Processor Test Suite. |
---|
10 | -- |
---|
11 | -- DEPENDENCIES: |
---|
12 | -- |
---|
13 | -- |
---|
14 | -- |
---|
15 | -- COPYRIGHT (c) 1989-2011. |
---|
16 | -- On-Line Applications Research Corporation (OAR). |
---|
17 | -- |
---|
18 | -- Redistribution and use in source and binary forms, with or without |
---|
19 | -- modification, are permitted provided that the following conditions |
---|
20 | -- are met: |
---|
21 | -- 1. Redistributions of source code must retain the above copyright |
---|
22 | -- notice, this list of conditions and the following disclaimer. |
---|
23 | -- 2. Redistributions in binary form must reproduce the above copyright |
---|
24 | -- notice, this list of conditions and the following disclaimer in the |
---|
25 | -- documentation and/or other materials provided with the distribution. |
---|
26 | -- |
---|
27 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
28 | -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
29 | -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
30 | -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
---|
31 | -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
32 | -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
33 | -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
34 | -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
35 | -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
36 | -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
37 | -- POSSIBILITY OF SUCH DAMAGE. |
---|
38 | -- |
---|
39 | |
---|
40 | with RTEMS; |
---|
41 | with RTEMS.TASKS; |
---|
42 | |
---|
43 | package SPTEST is |
---|
44 | |
---|
45 | -- |
---|
46 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
47 | -- by this test. |
---|
48 | -- |
---|
49 | |
---|
50 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.ID; |
---|
51 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.NAME; |
---|
52 | |
---|
53 | -- |
---|
54 | -- This array contains the floating point factors used by the |
---|
55 | -- floating point tasks in this test. |
---|
56 | -- |
---|
57 | |
---|
58 | FP_FACTORS : array ( RTEMS.UNSIGNED32 range 0 .. 9 ) of FLOAT; |
---|
59 | |
---|
60 | -- |
---|
61 | -- This array contains the integer factors used by the |
---|
62 | -- integer tasks in this test. |
---|
63 | -- |
---|
64 | |
---|
65 | INTEGER_FACTORS : array ( RTEMS.UNSIGNED32 range 0 .. 9 ) of |
---|
66 | RTEMS.UNSIGNED32; |
---|
67 | |
---|
68 | -- |
---|
69 | -- INIT |
---|
70 | -- |
---|
71 | -- DESCRIPTION: |
---|
72 | -- |
---|
73 | -- This RTEMS task initializes the application. |
---|
74 | -- |
---|
75 | |
---|
76 | procedure INIT ( |
---|
77 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
78 | ); |
---|
79 | pragma Convention (C, INIT); |
---|
80 | |
---|
81 | -- |
---|
82 | -- FIRST_FP_TASK |
---|
83 | -- |
---|
84 | -- DESCRIPTION: |
---|
85 | -- |
---|
86 | -- This RTEMS task tests the restart and deletion of floating point tasks. |
---|
87 | -- |
---|
88 | |
---|
89 | procedure FIRST_FP_TASK ( |
---|
90 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
91 | ); |
---|
92 | pragma Convention (C, FIRST_FP_TASK); |
---|
93 | |
---|
94 | -- |
---|
95 | -- FP_TASK |
---|
96 | -- |
---|
97 | -- DESCRIPTION: |
---|
98 | -- |
---|
99 | -- This RTEMS task tests the basic capabilities of a floating point |
---|
100 | -- task. |
---|
101 | -- |
---|
102 | |
---|
103 | procedure FP_TASK ( |
---|
104 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
105 | ); |
---|
106 | pragma Convention (C, FP_TASK); |
---|
107 | |
---|
108 | -- |
---|
109 | -- TASK_1 |
---|
110 | -- |
---|
111 | -- DESCRIPTION: |
---|
112 | -- |
---|
113 | -- This RTEMS task provides a non-floating point task to test |
---|
114 | -- that an application can utilize a mixture of floating point |
---|
115 | -- and non-floating point tasks. |
---|
116 | -- |
---|
117 | |
---|
118 | procedure TASK_1 ( |
---|
119 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
120 | ); |
---|
121 | pragma Convention (C, TASK_1); |
---|
122 | |
---|
123 | -- |
---|
124 | -- Add_Float |
---|
125 | -- |
---|
126 | -- DESCRIPTION: |
---|
127 | -- |
---|
128 | -- This method ensures the compilers thinks we are using the variables. |
---|
129 | -- |
---|
130 | |
---|
131 | function Add_Float( |
---|
132 | n : in Float; |
---|
133 | factor : in Float |
---|
134 | ) return Float; |
---|
135 | pragma Interface (C, Add_Float); |
---|
136 | pragma Interface_Name (Add_Float, "add_float"); |
---|
137 | |
---|
138 | end SPTEST; |
---|