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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

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

  • Property mode set to 100644
File size: 2.5 KB
Line 
1--
2--  TMTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 16 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 RTEMS;
22with RTEMS.TASKS;
23with TIME_TEST_SUPPORT;
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 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
33
34--
35--  This variable is used to index through the TASK_ID array
36--  so that events can be send to the next task.
37--
38
39   TASK_COUNT : RTEMS.UNSIGNED32;
40
41--
42--  The following variable is set to the execution time returned
43--  by the timer.
44--
45
46   END_TIME  : RTEMS.UNSIGNED32;
47
48--
49--  INIT
50--
51--  DESCRIPTION:
52--
53--  This RTEMS task initializes the application. 
54--
55
56   procedure INIT (
57      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
58   );
59   pragma Convention (C, INIT);
60
61--
62--  TEST_INIT
63--
64--  DESCRIPTION:
65--
66--  This subprogram performs test initialization.  Once initialization
67--  has been completed, this task sets the TASK_COUNT to 0 and
68--  starts the timer before performing a preemptive EVENT_SEND.
69--
70
71   procedure TEST_INIT (
72      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
73   );
74   pragma Convention (C, TEST_INIT);
75
76--
77--  HIGH_TASK
78--
79--  DESCRIPTION:
80--
81--  This RTEMS task is highest priority task in the system.
82--  Its first action is to perform a blocking EVENT_RECEIVE.
83--  It is the last task to have its event set sent to it.  Thus it
84--  is the last task to be awakened by a preemptive EVENT_SEND.
85--  After it preempts the last MIDDLE_TASKS, it stops the timer
86--  and reports the execution time of preemptive EVENT_SEND.
87--
88
89   procedure HIGH_TASK (
90      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
91   );
92   pragma Convention (C, HIGH_TASK);
93
94--
95--  MIDDLE_TASKS
96--
97--  DESCRIPTION:
98--
99--  These RTEMS tasks perform a blocking EVENT_RECEIVE.  When
100--  readied, each task will increment the TASK_COUNT and
101--  perform a preemptive EVENT_SEND.  TASK_COUNT is used to
102--  index the TASK_ID array in such a way that incrementing
103--  TASK_COUNT makes it index the ID of the next task to
104--  send events to.
105--
106
107   procedure MIDDLE_TASKS (
108      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
109   );
110   pragma Convention (C, MIDDLE_TASKS);
111
112end TMTEST;
Note: See TracBrowser for help on using the repository browser.