1 | -- |
---|
2 | -- SPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 20 of the RTEMS |
---|
7 | -- Single Processor Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989-1997. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- Copyright assigned to U.S. Government, 1994. |
---|
16 | -- |
---|
17 | -- The license and distribution terms for this file may in |
---|
18 | -- the file LICENSE in this distribution or at |
---|
19 | -- http://www.OARcorp.com/rtems/license.html. |
---|
20 | -- |
---|
21 | -- $Id$ |
---|
22 | -- |
---|
23 | |
---|
24 | with RTEMS; |
---|
25 | |
---|
26 | package SPTEST is |
---|
27 | |
---|
28 | -- |
---|
29 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
30 | -- by this test. |
---|
31 | -- |
---|
32 | |
---|
33 | TASK_ID : array ( 1 .. 5 ) of RTEMS.ID; |
---|
34 | TASK_NAME : array ( 1 .. 5 ) of RTEMS.NAME; |
---|
35 | |
---|
36 | -- |
---|
37 | -- These arrays contain the parameters which define the execution |
---|
38 | -- characteristics and periods of each instantiation of the |
---|
39 | -- copies of the RTEMS task TASKS_1_THROUGH_5. |
---|
40 | -- |
---|
41 | |
---|
42 | PERIODS : constant array ( 1 .. 5 ) |
---|
43 | of RTEMS.UNSIGNED32 := ( 2, 2, 2, 2, 100 ); |
---|
44 | |
---|
45 | ITERATIONS : constant array ( 1 .. 5 ) |
---|
46 | of RTEMS.UNSIGNED32 := ( 50, 50, 50, 50, 1 ); |
---|
47 | |
---|
48 | PRIORITIES : constant array ( 1 .. 5 ) |
---|
49 | of RTEMS.UNSIGNED32 := ( 1, 1, 3, 4, 5 ); |
---|
50 | |
---|
51 | -- |
---|
52 | -- The following type defines the array used to manage the |
---|
53 | -- execution counts of each task's period. |
---|
54 | -- |
---|
55 | |
---|
56 | type COUNT_ARRAY is array ( 1 .. 5 ) of RTEMS.UNSIGNED32; |
---|
57 | |
---|
58 | -- |
---|
59 | -- These arrays contains the number of periods successfully completed |
---|
60 | -- by each of the tasks. At each of its periods, the fifth task |
---|
61 | -- will copy the contents of the COUNT array to TEMPORARY_COUNT, |
---|
62 | -- and clear the COUNT array. The copy is performed to insure |
---|
63 | -- that no periods fire while it is verifying the correctness |
---|
64 | -- of the test's execution. |
---|
65 | -- |
---|
66 | |
---|
67 | COUNT : SPTEST.COUNT_ARRAY; |
---|
68 | TEMPORARY_COUNT : SPTEST.COUNT_ARRAY; |
---|
69 | |
---|
70 | -- |
---|
71 | -- INIT |
---|
72 | -- |
---|
73 | -- DESCRIPTION: |
---|
74 | -- |
---|
75 | -- This RTEMS task initializes the application. |
---|
76 | -- |
---|
77 | |
---|
78 | procedure INIT ( |
---|
79 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
80 | ); |
---|
81 | |
---|
82 | -- |
---|
83 | -- TASK_1_THROUGH_5 |
---|
84 | -- |
---|
85 | -- DESCRIPTION: |
---|
86 | -- |
---|
87 | -- These RTEMS tasks test the Rate Monotonic Manager. |
---|
88 | -- |
---|
89 | |
---|
90 | procedure TASK_1_THROUGH_5 ( |
---|
91 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
92 | ); |
---|
93 | |
---|
94 | -- |
---|
95 | -- GET_ALL_COUNTERS |
---|
96 | -- |
---|
97 | -- DESCRIPTION: |
---|
98 | -- |
---|
99 | -- This subprogram atomically copies the contents of COUNTER to |
---|
100 | -- TEMPORARY_COUNTER. |
---|
101 | -- |
---|
102 | |
---|
103 | procedure GET_ALL_COUNTERS; |
---|
104 | |
---|
105 | end SPTEST; |
---|