source: rtems/c/src/ada-tests/tmtests/tm05/tmtest.ads @ 6d4e604b

4.104.114.84.95
Last change on this file since 6d4e604b was 6d4e604b, checked in by Joel Sherrill <joel.sherrill@…>, on 06/02/97 at 20:19:03

Initial revision

  • Property mode set to 100644
File size: 3.8 KB
Line 
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, 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:43:17 joel Exp
22--
23
24with TIME_TEST_SUPPORT;
25with TIMER_DRIVER;
26with RTEMS;
27
28package TMTEST is
29
30--
31--  This array contains the IDs of all RTEMS tasks created by this test.
32--
33
34   TASK_ID : array ( RTEMS.UNSIGNED32
35      range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
36
37   TASK_INDEX : RTEMS.UNSIGNED32;
38
39--
40--  The following variable is set to the execution time returned
41--  by the timer.
42--
43
44   END_TIME  : RTEMS.UNSIGNED32;
45
46--
47--  INIT
48--
49--  DESCRIPTION:
50--
51--  This RTEMS task initializes the application.
52--
53
54   procedure INIT (
55      ARGUMENT : in     RTEMS.TASK_ARGUMENT
56   );
57
58--
59--  TEST_INIT
60--
61--  DESCRIPTION:
62--
63--  This subprogram performs test initialization.
64--
65
66   procedure TEST_INIT;
67
68--
69--  HIGH_TASK
70--
71--  DESCRIPTION:
72--
73--  This RTEMS task is the highest priority task in the system. 
74--  It starts the timer and performs a TASK_SUSPEND on SELF.
75--  When this task executes again, it stops the timer and
76--  reports the execution time for a preemptive TASK_RESUME.
77--
78
79   procedure HIGH_TASK (
80      ARGUMENT : in     RTEMS.TASK_ARGUMENT
81   );
82
83--
84--  MIDDLE_TASKS
85--
86--  DESCRIPTION:
87--
88--  These RTEMS tasks perform a TASK_SUSPEND on SELF.  When each
89--  task executes again, it performs preemptive TASK_RESUME on
90--  a higher priority task.
91--
92
93   procedure MIDDLE_TASKS (
94      ARGUMENT : in     RTEMS.TASK_ARGUMENT
95   );
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.TASK_ARGUMENT
111   );
112
113--
114--  This is the Initialization Tasks Table for this test.
115--
116
117   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
118   (1=>
119     (
120       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
121       2048,                                          -- stack size
122       1,                                             -- priority
123       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
124       TMTEST.INIT'ACCESS,                            -- entry point
125       RTEMS.NO_PREEMPT,                              -- initial mode
126       0                                              -- argument list
127     )
128   );
129
130--
131--  This is the Configuration Table for this test.
132--
133
134   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
135      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
136      256 * 1024,                -- executive RAM size
137      111,                       -- maximum # tasks
138      110,                       -- maximum # timers
139      101,                       -- maximum # semaphores
140      0,                         -- maximum # message queues
141      0,                         -- maximum # messages
142      0,                         -- maximum # partitions
143      0,                         -- maximum # regions
144      0,                         -- maximum # dp memory areas
145      0,                         -- maximum # periods
146      0,                         -- maximum # user extensions
147      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
148      0                          -- # ticks in a timeslice
149  );
150
151end TMTEST;
Note: See TracBrowser for help on using the repository browser.