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-2011. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- |
---|
16 | -- The license and distribution terms for this file may in |
---|
17 | -- the file LICENSE in this distribution or at |
---|
18 | -- http://www.rtems.org/license/LICENSE. |
---|
19 | -- |
---|
20 | |
---|
21 | with RTEMS; |
---|
22 | with RTEMS.TASKS; |
---|
23 | |
---|
24 | package SPTEST is |
---|
25 | |
---|
26 | -- |
---|
27 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
28 | -- by this test. |
---|
29 | -- |
---|
30 | |
---|
31 | TASK_ID : array ( 1 .. 6 ) of RTEMS.ID; |
---|
32 | TASK_NAME : array ( 1 .. 6 ) of RTEMS.NAME; |
---|
33 | |
---|
34 | -- |
---|
35 | -- These arrays contain the parameters which define the execution |
---|
36 | -- characteristics and periods of each instantiation of the |
---|
37 | -- copies of the RTEMS task TASKS_1_THROUGH_6. |
---|
38 | -- |
---|
39 | |
---|
40 | PERIODS : constant array ( 1 .. 6 ) |
---|
41 | of RTEMS.UNSIGNED32 := ( 2, 2, 2, 2, 100, 0 ); |
---|
42 | |
---|
43 | ITERATIONS : constant array ( 1 .. 6 ) |
---|
44 | of RTEMS.UNSIGNED32 := ( 50, 50, 50, 50, 1, 10 ); |
---|
45 | |
---|
46 | PRIORITIES : constant array ( 1 .. 6 ) |
---|
47 | of RTEMS.UNSIGNED32 := ( 1, 1, 3, 4, 5, 1 ); |
---|
48 | |
---|
49 | -- |
---|
50 | -- The following type defines the array used to manage the |
---|
51 | -- execution counts of each task's period. |
---|
52 | -- |
---|
53 | |
---|
54 | type COUNT_ARRAY is array ( 1 .. 6 ) of RTEMS.UNSIGNED32; |
---|
55 | |
---|
56 | -- |
---|
57 | -- These arrays contains the number of periods successfully completed |
---|
58 | -- by each of the tasks. At each of its periods, the fifth task |
---|
59 | -- will copy the contents of the COUNT array to TEMPORARY_COUNT, |
---|
60 | -- and clear the COUNT array. The copy is performed to insure |
---|
61 | -- that no periods fire while it is verifying the correctness |
---|
62 | -- of the test's execution. |
---|
63 | -- |
---|
64 | |
---|
65 | COUNT : SPTEST.COUNT_ARRAY; |
---|
66 | TEMPORARY_COUNT : SPTEST.COUNT_ARRAY; |
---|
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 | -- TASK_1_THROUGH_6 |
---|
83 | -- |
---|
84 | -- DESCRIPTION: |
---|
85 | -- |
---|
86 | -- These RTEMS tasks test the Rate Monotonic Manager. |
---|
87 | -- |
---|
88 | |
---|
89 | procedure TASK_1_THROUGH_6 ( |
---|
90 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
91 | ); |
---|
92 | pragma Convention (C, TASK_1_THROUGH_6); |
---|
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; |
---|