source: rtems/c/src/ada-tests/tmtests/tm04/tmtest.ads @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1--
2--  TMTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 4 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
21with TIME_TEST_SUPPORT;
22with RTEMS;
23with RTEMS.TASKS;
24
25package 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 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
33
34--
35--  This variable contains the id of the highest priority task
36--  in the system.
37--
38
39   HIGHEST_ID : RTEMS.ID;
40
41--
42--  The following is the ID of the semaphore used for timing operations.
43--
44
45   SEMAPHORE_ID : RTEMS.ID;
46
47--
48--  The following is used to perform the same operation
49--  on a group of tasks.
50--
51
52   TASK_COUNT : RTEMS.UNSIGNED32;
53
54--
55--  The following variable is set to the execution time returned
56--  by the timer.
57--
58
59   END_TIME  : RTEMS.UNSIGNED32;
60
61--
62--  INIT
63--
64--  DESCRIPTION:
65--
66--  This RTEMS task initializes the application.
67--
68
69   procedure INIT (
70      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
71   );
72   pragma Convention (C, INIT);
73
74--
75--  TEST_INIT
76--
77--  DESCRIPTION:
78--
79--  This subprogram performs test initialization.
80--
81
82   procedure TEST_INIT;
83
84--
85--  HIGHEST_TASK
86--
87--  DESCRIPTION:
88--
89--  This RTEMS task is created by one of the LOW_TASKS.  The
90--  first time it executes, it performs a blocking SEMAPHORE_OBTAIN
91--  which transfers control of the processor to HIGH_TASK.
92--  The first time HIGHEST_TASK is restarted, it stops the
93--  timer and reports the execution time for a TASK_RESTART
94--  for a blocked task which preempts the caller.  The second
95--  time HIGHEST_TASK is restarted, it stops the timer and reports
96--  the execution time for a TASK_RESTART for a ready task which
97--  has its original priority restored and preempts the caller. 
98--
99
100   procedure HIGHEST_TASK (
101      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
102   );
103   pragma Convention (C, HIGHEST_TASK);
104
105--
106--  HIGH_TASK
107--
108--  DESCRIPTION:
109--
110--  This RTEMS task is created by one of the LOW_TASKS.   This
111--  task restarts HIGHEST_TASK twice.  HIGHEST_TASK is blocked the
112--  first time and preempts this task when restarted.  HIGHEST_TASK
113--  is ready the second time but has lowered its priority.  When
114--  restarted for the second time, HIGHEST_TASK will have its
115--  original priority restored and preempt this task.
116--  Once control of the processor is returned to this task after
117--  HIGHEST_TASK deletes itself, the following execution times
118--  are measured and reported.
119--
120--    + readying SEMAPHORE_RELEASE
121--    + TASK_CREATE
122--    + TASK_START
123--    + TASK_RESTART of a suspended task
124--    + TASK_DELETE of a suspended task
125--    + TASK_RESTART of a ready task
126--    + TASK_RESTART of a blocked task which does not cause a preempt
127--    + TASK_DELETE of a blocked task
128--
129
130   procedure HIGH_TASK (
131      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
132   );
133   pragma Convention (C, HIGH_TASK);
134
135--
136--  LOW_TASKS
137--
138--  DESCRIPTION:
139--
140--  The last of these RTEMS tasks to execute creates HIGH_TASK
141--  and HIGHEST_TASK.  All of these tasks perform a blocking
142--  SEMAPHORE_OBTAIN.
143--
144
145   procedure LOW_TASKS (
146      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
147   );
148   pragma Convention (C, LOW_TASKS);
149
150--
151--  RESTART_TASK
152--
153--  DESCRIPTION:
154--
155--  This RTEMS task
156--
157
158   procedure RESTART_TASK (
159      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
160   );
161   pragma Convention (C, RESTART_TASK);
162
163end TMTEST;
Note: See TracBrowser for help on using the repository browser.