1 | -- |
---|
2 | -- TMTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 23 of the RTEMS |
---|
7 | -- Timing Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- All rights assigned to U.S. Government, 1994. |
---|
16 | -- |
---|
17 | -- This material may be reproduced by or for the U.S. Government pursuant |
---|
18 | -- to the copyright license under the clause at DFARS 252.227-7013. This |
---|
19 | -- notice must appear in all copies of this file and its derivatives. |
---|
20 | -- |
---|
21 | -- tmtest.ads,v 1.3 1995/07/12 19:44:15 joel Exp |
---|
22 | -- |
---|
23 | |
---|
24 | with TIMER_DRIVER; |
---|
25 | with TIME_TEST_SUPPORT; |
---|
26 | with RTEMS; |
---|
27 | |
---|
28 | package TMTEST is |
---|
29 | |
---|
30 | -- |
---|
31 | -- This array contains the IDs of all RTEMS timers created by this test. |
---|
32 | -- |
---|
33 | |
---|
34 | TIMER_ID : array ( RTEMS.UNSIGNED32 |
---|
35 | range 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID; |
---|
36 | |
---|
37 | -- |
---|
38 | -- This data item contains a time of day used by all of the |
---|
39 | -- "WHEN" directives timed in this test. |
---|
40 | -- |
---|
41 | |
---|
42 | TIME_OF_DAY : RTEMS.TIME_OF_DAY; |
---|
43 | |
---|
44 | -- |
---|
45 | -- The following variable is set to the execution time returned |
---|
46 | -- by the timer. |
---|
47 | -- |
---|
48 | |
---|
49 | END_TIME : RTEMS.UNSIGNED32; |
---|
50 | |
---|
51 | -- |
---|
52 | -- INIT |
---|
53 | -- |
---|
54 | -- DESCRIPTION: |
---|
55 | -- |
---|
56 | -- This RTEMS task initializes the application. |
---|
57 | -- |
---|
58 | |
---|
59 | procedure INIT ( |
---|
60 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
61 | ); |
---|
62 | |
---|
63 | -- |
---|
64 | -- NULL_DELAY |
---|
65 | -- |
---|
66 | -- DESCRIPTION: |
---|
67 | -- |
---|
68 | -- This subprogram is a timer service routine. It performs |
---|
69 | -- no actions. |
---|
70 | -- |
---|
71 | |
---|
72 | procedure NULL_DELAY ( |
---|
73 | IGNORED_ID : in RTEMS.ID; |
---|
74 | IGNORED_ADDRESS : in RTEMS.ADDRESS |
---|
75 | ); |
---|
76 | |
---|
77 | -- |
---|
78 | -- HIGH_TASK |
---|
79 | -- |
---|
80 | -- DESCRIPTION: |
---|
81 | -- |
---|
82 | -- This RTEMS task is responsible for measuring and reporting |
---|
83 | -- the following directive execution times: |
---|
84 | -- |
---|
85 | -- + TIMER_CREATE |
---|
86 | -- + TIMER_FIRE_AFTER with an inactive timer |
---|
87 | -- + TIMER_FIRE_AFTER with an active timer |
---|
88 | -- + TIMER_CANCEL of an active timer |
---|
89 | -- + TIMER_CANCEL of an inactive timer |
---|
90 | -- + TIMER_RESET of an active timer |
---|
91 | -- + TIMER_RESET of an inactive timer |
---|
92 | -- + TIMER_FIRE_WHEN of an inactive timer |
---|
93 | -- + TIMER_FIRE_WHEN of an active timer |
---|
94 | -- + TIMER_DELETE of an active timer |
---|
95 | -- + TIMER_DELETE of an inactive timer |
---|
96 | -- |
---|
97 | -- After measuring and reporting the above times, this task starts |
---|
98 | -- the timer and executes the TASK_WAKE_WHEN directive. |
---|
99 | -- |
---|
100 | |
---|
101 | procedure HIGH_TASK ( |
---|
102 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
103 | ); |
---|
104 | |
---|
105 | -- |
---|
106 | -- MIDDLE_TASKS |
---|
107 | -- |
---|
108 | -- DESCRIPTION: |
---|
109 | -- |
---|
110 | -- These RTEMS tasks executes the TASK_WAKE_WHEN directive. |
---|
111 | -- |
---|
112 | |
---|
113 | procedure MIDDLE_TASKS ( |
---|
114 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
115 | ); |
---|
116 | |
---|
117 | -- |
---|
118 | -- MIDDLE_TASKS |
---|
119 | -- |
---|
120 | -- DESCRIPTION: |
---|
121 | -- |
---|
122 | -- This RTEMS task stops the timer and reports the execution time for |
---|
123 | -- the TASK_WAKE_WHEN directive. |
---|
124 | -- |
---|
125 | |
---|
126 | procedure LOW_TASK ( |
---|
127 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
128 | ); |
---|
129 | |
---|
130 | -- |
---|
131 | -- This is the Initialization Tasks Table for this test. |
---|
132 | -- |
---|
133 | |
---|
134 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
135 | (1=> |
---|
136 | ( |
---|
137 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
138 | 2048, -- stack size |
---|
139 | 1, -- priority |
---|
140 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
141 | TMTEST.INIT'ACCESS, -- entry point |
---|
142 | RTEMS.NO_PREEMPT, -- initial mode |
---|
143 | 0 -- argument list |
---|
144 | ) |
---|
145 | ); |
---|
146 | |
---|
147 | -- |
---|
148 | -- This is the Configuration Table for this test. |
---|
149 | -- |
---|
150 | |
---|
151 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
152 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
153 | 256 * 1024, -- executive RAM size |
---|
154 | 111, -- maximum # tasks |
---|
155 | 110, -- maximum # timers |
---|
156 | 0, -- maximum # semaphores |
---|
157 | 0, -- maximum # message queues |
---|
158 | 0, -- maximum # messages |
---|
159 | 0, -- maximum # partitions |
---|
160 | 0, -- maximum # regions |
---|
161 | 0, -- maximum # dp memory areas |
---|
162 | 0, -- maximum # periods |
---|
163 | 0, -- maximum # user extensions |
---|
164 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
165 | 0 -- # ticks in a timeslice |
---|
166 | ); |
---|
167 | |
---|
168 | end TMTEST; |
---|