source: rtems/c/src/ada-tests/sptests/sp17/sptest.ads @ bf9ae83

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

modified copyright notice to be the same as RTEMS 4.0.0.

changed the CVS ID string to be a "development" version.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1--
2--  SPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 17 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 CLOCK_DRIVER;
25with RTEMS;
26
27package SPTEST is
28
29--
30--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
31--  by this test.
32--
33
34   TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
35   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
36
37--
38--  The following is set to TRUE by TASK_2 when it preempts TASK_1.
39--
40
41   TASK_2_PREEMPTED : RTEMS.BOOLEAN;
42
43--
44--  INIT
45--
46--  DESCRIPTION:
47--
48--  This RTEMS task initializes the application.
49--
50
51   procedure INIT (
52      ARGUMENT : in     RTEMS.TASK_ARGUMENT
53   );
54
55--
56--  PROCESS_ASR
57--
58--  DESCRIPTION:
59--
60--  This subprogram is the ASR for TASK_1.
61--
62
63   procedure PROCESS_ASR (
64      SIGNALS : in     RTEMS.SIGNAL_SET
65   );
66
67--
68--  TASK_1
69--
70--  DESCRIPTION:
71--
72--  This RTEMS task tests that when the transfer from the task
73--  to the ASR (and vice-versa) is performed, that the new mode
74--  is taken into account.  If this occurs, then TASK_2 will be
75--  able to preempt upon completion of the ASR of TASK_1.
76--
77
78   procedure TASK_1 (
79      ARGUMENT : in     RTEMS.TASK_ARGUMENT
80   );
81
82--
83--  TASK_2
84--
85--  DESCRIPTION:
86--
87--  This RTEMS task is designed to preempt TASK_1.
88--
89
90   procedure TASK_2 (
91      ARGUMENT : in     RTEMS.TASK_ARGUMENT
92   );
93
94--
95--  This is the Driver Address Table for this test.
96--
97
98   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
99   (1=>
100      (
101        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
102        RTEMS.NO_DRIVER_ENTRY,                       -- Open
103        RTEMS.NO_DRIVER_ENTRY,                       -- Close
104        RTEMS.NO_DRIVER_ENTRY,                       -- Read
105        RTEMS.NO_DRIVER_ENTRY,                       -- Write
106        RTEMS.NO_DRIVER_ENTRY                        -- Control
107      )
108   );
109
110--
111--  This is the Initialization Tasks Table for this test.
112--
113
114   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
115   (1=>
116     (
117       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
118       2048,                                          -- stack size
119       1,                                             -- priority
120       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
121       SPTEST.INIT'ACCESS,                            -- entry point
122       RTEMS.NO_PREEMPT,                              -- initial mode
123       0                                              -- argument list
124     )
125   );
126
127--
128--  This is the Configuration Table for this test.
129--
130
131   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
132      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
133      64 * 1024,                 -- executive RAM size
134      10,                        -- maximum # tasks
135      0,                         -- maximum # timers
136      0,                         -- maximum # semaphores
137      0,                         -- maximum # message queues
138      0,                         -- maximum # messages
139      0,                         -- maximum # partitions
140      0,                         -- maximum # regions
141      0,                         -- maximum # dp memory areas
142      0,                         -- maximum # periods
143      0,                         -- maximum # user extensions
144      RTEMS.MILLISECONDS_TO_MICROSECONDS(25), -- # us in a tick
145      1000                       -- # ticks in a timeslice
146  );
147
148end SPTEST;
Note: See TracBrowser for help on using the repository browser.