source: rtems/c/src/ada-tests/tmtests/tm22/tmtest.ads @ e17ffea

4.104.114.84.95
Last change on this file since e17ffea was e17ffea, checked in by Joel Sherrill <joel.sherrill@…>, on 06/03/97 at 22:06:49

Changed to variable length messages.

  • Property mode set to 100644
File size: 2.7 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-1997.
14--  On-Line Applications Research Corporation (OAR).
15--  Copyright assigned to U.S. Government, 1994.
16--
17--  The license and distribution terms for this file may in
18--  the file LICENSE in this distribution or at
19--  http://www.OARcorp.com/rtems/license.html.
20--
21--  $Id$
22--
23
24with TIMER_DRIVER;
25with RTEMS;
26
27package TMTEST is
28
29--
30--  Buffer Record similar to that used by RTEMS 3.2.1.  Using this
31--  avoids changes to the test.
32--
33
34   type BUFFER is
35      record
36         FIELD1 : RTEMS.UNSIGNED32;   -- TEMPORARY UNTIL VARIABLE LENGTH
37         FIELD2 : RTEMS.UNSIGNED32;
38         FIELD3 : RTEMS.UNSIGNED32;
39         FIELD4 : RTEMS.UNSIGNED32;
40      end record;
41
42--
43--  The following is the ID of the message queue used for timing operations.
44--
45
46   MESSAGE_QUEUE_ID : RTEMS.ID;
47
48--
49--  The following variable is set to the execution time returned
50--  by the timer.
51--
52
53   END_TIME  : RTEMS.UNSIGNED32;
54
55--
56--  INIT
57--
58--  DESCRIPTION:
59--
60--  This RTEMS task initializes the application.
61--
62
63   procedure INIT (
64      ARGUMENT : in     RTEMS.TASK_ARGUMENT
65   );
66
67--
68--  HIGH_TASK
69--
70--  DESCRIPTION:
71--
72--  This RTEMS task is created by LOW_TASK and executes after
73--  LOW_TASK has performed a blocking MESSAGE_QUEUE_RECEIVE.
74--  This task then executes and performs a readying
75--  MESSAGE_QUEUE_BROADCAST and reports its execution time.
76--  Finally, the task suspends itself so LOW_TASK can continue
77--  execution.
78--
79
80   procedure HIGH_TASK (
81      ARGUMENT : in     RTEMS.TASK_ARGUMENT
82   );
83
84--
85--  LOW_TASK
86--
87--  DESCRIPTION:
88--
89--  This RTEMS task performs a blocking MESSAGE_QUEUE_RECEIVE
90--  so that when HIGH_TASK performs a MESSAGE_QUEUE_BROADCAST,
91--  there will be a task to be readied.  Following this, the
92--  execution time for a MESSAGE_QUEUE_BROADCAST to a message
93--  queue with no waiting tasks is measured and reported.
94--  Then this task performs another blocking MESSAGE_QUEUE_RECEIVE
95--  so that when PREEMPT_TASK performs a MESSAGE_QUEUE_BROADCAST,
96--  PREEMPT_TASK will be preempted by this task.  After control
97--  of the processor is transferred back to this task by the
98--  preemption, the timer is stopped and the execution time of
99--  a preemptive MESSAGE_QUEUE_BROADCAST is reported.
100--
101
102   procedure LOW_TASK (
103      ARGUMENT : in     RTEMS.TASK_ARGUMENT
104   );
105
106--
107--  PREEMPT_TASK
108--
109--  DESCRIPTION:
110--
111--  This RTEMS task starts the timer and performs a preemptive
112--   MESSAGE_QUEUE_BROADCAST.
113--
114
115   procedure PREEMPT_TASK (
116      ARGUMENT : in     RTEMS.TASK_ARGUMENT
117   );
118
119end TMTEST;
Note: See TracBrowser for help on using the repository browser.