source: rtems/c/src/ada-tests/sptests/sp04/sptest.ads @ 82870ab

4.104.114.84.95
Last change on this file since 82870ab was f2078ec, checked in by Joel Sherrill <joel.sherrill@…>, on 06/03/97 at 00:13:05

New style main procedure which creates the test's RTEMS initialization task
as an RTEMS task. This avoid problems resulting from differences in the
tasking mode/priority of Ada tasks from the typical way an RTEMS initialization
task is created.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1--
2--  SPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 4 of the RTEMS
7--  Single Processor 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 RTEMS;
25
26package SPTEST is
27
28--
29--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
30--  by this test.
31--
32
33   TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
34   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
35
36--
37--  These arrays contain the IDs and NAMEs of all RTEMS extensions created
38--  by this test.
39--
40 
41   EXTENSION_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
42   EXTENSION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
43 
44--
45--  This array contains the number of times each of the test tasks has
46--  been context switched TO.
47--
48
49   RUN_COUNT : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.UNSIGNED32;
50
51--
52--  INIT
53--
54--  DESCRIPTION:
55--
56--  This RTEMS task initializes the application.
57--
58
59   procedure INIT (
60      ARGUMENT : in     RTEMS.TASK_ARGUMENT
61   );
62
63--
64--  TASK_1
65--
66--  DESCRIPTION:
67--
68--  This RTEMS task tests some of the capabilities of the Task Manager.
69--
70
71   procedure TASK_1 (
72      ARGUMENT : in     RTEMS.TASK_ARGUMENT
73   );
74
75--
76--  TASK_2
77--
78--  DESCRIPTION:
79--
80--  This RTEMS task is used as a background task to suspend, resume,
81--  and context switch to.
82--
83
84   procedure TASK_2 (
85      ARGUMENT : in     RTEMS.TASK_ARGUMENT
86   );
87
88--
89--  TASK_3
90--
91--  DESCRIPTION:
92--
93--  This RTEMS task is used as a background task to suspend, resume,
94--  and context switch to.
95--
96
97   procedure TASK_3 (
98      ARGUMENT : in     RTEMS.TASK_ARGUMENT
99   );
100
101--
102--  TASK_SWITCH
103--
104--  DESCRIPTION:
105--
106--  This subprogram is the TASK_SWITCH extension for this test.
107--  It is invoked at each context switch and counts the number
108--  of times each application task has been context switched to.
109--
110
111   procedure TASK_SWITCH (
112      UNUSED : in     RTEMS.TCB_POINTER;
113      HEIR   : in     RTEMS.TCB_POINTER
114   );
115
116--
117--  This is the User Extension Table for this test.
118--
119
120   EXTENSIONS : aliased RTEMS.EXTENSIONS_TABLE :=
121   (
122        NULL,                                        -- Task create
123        NULL,                                        -- Task start
124        NULL,                                        -- Task restart
125        NULL,                                        -- Task delete
126        SPTEST.TASK_SWITCH'ACCESS,                   -- Task switch
127        NULL,                                        -- Task post switch
128        NULL,                                        -- Task begin
129        NULL,                                        -- Task exitted
130        NULL                                         -- Fatal error
131   );
132
133end SPTEST;
Note: See TracBrowser for help on using the repository browser.