source: rtems/c/src/ada-tests/tmtests/tm22/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: 4.0 KB
Line 
1--
2--  TMTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 22 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:11 joel Exp
22--
23
24with TIMER_DRIVER;
25with RTEMS;
26
27package TMTEST is
28
29--
30--  The following is the ID of the message queue used for timing operations.
31--
32
33   MESSAGE_QUEUE_ID : RTEMS.ID;
34
35--
36--  The following variable is set to the execution time returned
37--  by the timer.
38--
39
40   END_TIME  : RTEMS.UNSIGNED32;
41
42--
43--  INIT
44--
45--  DESCRIPTION:
46--
47--  This RTEMS task initializes the application.
48--
49
50   procedure INIT (
51      ARGUMENT : in     RTEMS.TASK_ARGUMENT
52   );
53
54--
55--  HIGH_TASK
56--
57--  DESCRIPTION:
58--
59--  This RTEMS task is created by LOW_TASK and executes after
60--  LOW_TASK has performed a blocking MESSAGE_QUEUE_RECEIVE.
61--  This task then executes and performs a readying
62--  MESSAGE_QUEUE_BROADCAST and reports its execution time.
63--  Finally, the task suspends itself so LOW_TASK can continue
64--  execution.
65--
66
67   procedure HIGH_TASK (
68      ARGUMENT : in     RTEMS.TASK_ARGUMENT
69   );
70
71--
72--  LOW_TASK
73--
74--  DESCRIPTION:
75--
76--  This RTEMS task performs a blocking MESSAGE_QUEUE_RECEIVE
77--  so that when HIGH_TASK performs a MESSAGE_QUEUE_BROADCAST,
78--  there will be a task to be readied.  Following this, the
79--  execution time for a MESSAGE_QUEUE_BROADCAST to a message
80--  queue with no waiting tasks is measured and reported.
81--  Then this task performs another blocking MESSAGE_QUEUE_RECEIVE
82--  so that when PREEMPT_TASK performs a MESSAGE_QUEUE_BROADCAST,
83--  PREEMPT_TASK will be preempted by this task.  After control
84--  of the processor is transferred back to this task by the
85--  preemption, the timer is stopped and the execution time of
86--  a preemptive MESSAGE_QUEUE_BROADCAST is reported.
87--
88
89   procedure LOW_TASK (
90      ARGUMENT : in     RTEMS.TASK_ARGUMENT
91   );
92
93--
94--  PREEMPT_TASK
95--
96--  DESCRIPTION:
97--
98--  This RTEMS task starts the timer and performs a preemptive
99--   MESSAGE_QUEUE_BROADCAST.
100--
101
102   procedure PREEMPT_TASK (
103      ARGUMENT : in     RTEMS.TASK_ARGUMENT
104   );
105
106--
107--  This is the Initialization Tasks Table for this test.
108--
109
110   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
111   (1=>
112     (
113       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
114       2048,                                          -- stack size
115       1,                                             -- priority
116       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
117       TMTEST.INIT'ACCESS,                            -- entry point
118       RTEMS.NO_PREEMPT,                              -- initial mode
119       0                                              -- argument list
120     )
121   );
122
123--
124--  This is the Configuration Table for this test.
125--
126
127   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
128      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
129      256 * 1024,                -- executive RAM size
130      103,                       -- maximum # tasks
131      0,                         -- maximum # timers
132      0,                         -- maximum # semaphores
133      1,                         -- maximum # message queues
134      101,                       -- maximum # messages
135      0,                         -- maximum # partitions
136      0,                         -- maximum # regions
137      0,                         -- maximum # dp memory areas
138      0,                         -- maximum # periods
139      0,                         -- maximum # user extensions
140      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
141      0                          -- # ticks in a timeslice
142  );
143
144end TMTEST;
Note: See TracBrowser for help on using the repository browser.