1 | -- |
---|
2 | -- TMTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 5 of the RTEMS |
---|
7 | -- Timing 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 TIME_TEST_SUPPORT; |
---|
22 | with RTEMS; |
---|
23 | with RTEMS.TASKS; |
---|
24 | |
---|
25 | package TMTEST is |
---|
26 | |
---|
27 | -- |
---|
28 | -- This array contains the IDs of all RTEMS tasks created by this test. |
---|
29 | -- |
---|
30 | |
---|
31 | TASK_ID : array ( RTEMS.UNSIGNED32 |
---|
32 | range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID; |
---|
33 | |
---|
34 | TASK_INDEX : RTEMS.UNSIGNED32; |
---|
35 | |
---|
36 | -- |
---|
37 | -- The following variable is set to the execution time returned |
---|
38 | -- by the timer. |
---|
39 | -- |
---|
40 | |
---|
41 | END_TIME : RTEMS.UNSIGNED32; |
---|
42 | |
---|
43 | -- |
---|
44 | -- INIT |
---|
45 | -- |
---|
46 | -- DESCRIPTION: |
---|
47 | -- |
---|
48 | -- This RTEMS task initializes the application. |
---|
49 | -- |
---|
50 | |
---|
51 | procedure INIT ( |
---|
52 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
53 | ); |
---|
54 | pragma Convention (C, INIT); |
---|
55 | |
---|
56 | -- |
---|
57 | -- TEST_INIT |
---|
58 | -- |
---|
59 | -- DESCRIPTION: |
---|
60 | -- |
---|
61 | -- This subprogram performs test initialization. |
---|
62 | -- |
---|
63 | |
---|
64 | procedure TEST_INIT; |
---|
65 | |
---|
66 | -- |
---|
67 | -- HIGH_TASK |
---|
68 | -- |
---|
69 | -- DESCRIPTION: |
---|
70 | -- |
---|
71 | -- This RTEMS task is the highest priority task in the system. |
---|
72 | -- It starts the timer and performs a TASK_SUSPEND on SELF. |
---|
73 | -- When this task executes again, it stops the timer and |
---|
74 | -- reports the execution time for a preemptive TASK_RESUME. |
---|
75 | -- |
---|
76 | |
---|
77 | procedure HIGH_TASK ( |
---|
78 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
79 | ); |
---|
80 | pragma Convention (C, HIGH_TASK); |
---|
81 | |
---|
82 | -- |
---|
83 | -- MIDDLE_TASKS |
---|
84 | -- |
---|
85 | -- DESCRIPTION: |
---|
86 | -- |
---|
87 | -- These RTEMS tasks perform a TASK_SUSPEND on SELF. When each |
---|
88 | -- task executes again, it performs preemptive TASK_RESUME on |
---|
89 | -- a higher priority task. |
---|
90 | -- |
---|
91 | |
---|
92 | procedure MIDDLE_TASKS ( |
---|
93 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
94 | ); |
---|
95 | pragma Convention (C, MIDDLE_TASKS); |
---|
96 | |
---|
97 | -- |
---|
98 | -- LOW_TASK |
---|
99 | -- |
---|
100 | -- DESCRIPTION: |
---|
101 | -- |
---|
102 | -- This RTEMS task is the lowest priority task in the system. |
---|
103 | -- When this task executes, it stops the timer and reports the |
---|
104 | -- execution time for a blocking TASK_SUSPEND. After this, |
---|
105 | -- it starts the timer and performs a TASK_RESUME on a |
---|
106 | -- higher priority task. |
---|
107 | -- |
---|
108 | |
---|
109 | procedure LOW_TASK ( |
---|
110 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
111 | ); |
---|
112 | pragma Convention (C, LOW_TASK); |
---|
113 | |
---|
114 | end TMTEST; |
---|