OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c94004b.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C94004B.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT A MAIN PROGRAM TERMINATES WITHOUT WAITING FOR TASKS THAT
26
-- DEPEND ON A LIBRARY PACKAGE AND THAT SUCH TASKS ARE NOT TERMINATED BY
27
-- MAIN PROGRAM TERMINATION.
28
 
29
-- CASE B:  ACCESS TO TASK TYPE DECLARED IN LIBRARY PACKAGE; TASK
30
--          ACTIVATED IN MAIN PROGRAM.
31
 
32
-- JRK 10/8/81
33
-- SPS 11/21/82
34
-- JBG 12/6/84
35
-- JRK 11/21/85  RENAMED FROM C94004B-B.ADA; REVISED ACCORDING TO
36
--               AI-00399.
37
-- JRK 10/24/86  RENAMED FROM E94004B-B.ADA; REVISED ACCORDING TO
38
--               REVISED AI-00399.
39
-- PWN 09/11/94  REMOVED PRAGMA PRIORITY FOR ADA 9X.
40
 
41
WITH SYSTEM; USE SYSTEM;
42
PACKAGE C94004B_PKG IS
43
 
44
     TASK TYPE TT IS
45
          ENTRY E;
46
     END TT;
47
 
48
END C94004B_PKG;
49
 
50
with Impdef;
51
WITH REPORT; USE REPORT;
52
PRAGMA ELABORATE (REPORT);
53
PACKAGE BODY C94004B_PKG IS
54
 
55
     TASK BODY TT IS
56
          I : INTEGER := IDENT_INT (120);
57
     BEGIN
58
          ACCEPT E;
59
          COMMENT ("DELAY LIBRARY TASK FOR TWO MINUTES");
60
          DELAY DURATION(I) * Impdef.One_Second;
61
          -- MAIN PROGRAM SHOULD NOW BE TERMINATED.
62
          RESULT;
63
     END TT;
64
 
65
END C94004B_PKG;
66
 
67
WITH C94004B_PKG; USE C94004B_PKG;
68
PRAGMA ELABORATE (C94004B_PKG);
69
PACKAGE C94004B_TASK IS
70
     TYPE ACC_TASK IS ACCESS C94004B_PKG.TT;
71
END;
72
 
73
WITH SYSTEM; USE SYSTEM;
74
WITH REPORT; USE REPORT;
75
WITH C94004B_TASK; WITH C94004B_PKG;
76
PROCEDURE C94004B IS
77
 
78
     T : C94004B_TASK.ACC_TASK;
79
 
80
BEGIN
81
     TEST ("C94004B", "CHECK THAT A MAIN PROGRAM TERMINATES " &
82
                      "WITHOUT WAITING FOR TASKS THAT DEPEND " &
83
                      "ON A LIBRARY PACKAGE AND THAT SUCH TASKS " &
84
                      "CONTINUE TO EXECUTE");
85
 
86
     COMMENT ("THE INVOKING SYSTEM'S JOB CONTROL LOG MUST BE " &
87
              "EXAMINED TO SEE IF THIS TEST REALLY TERMINATES");
88
 
89
     T := NEW C94004B_PKG.TT;
90
     T.E;      -- ALLOW TASK TO PROCEED.
91
     IF T'TERMINATED THEN
92
          FAILED ("LIBRARY DECLARED TASK PREMATURELY TERMINATED");
93
     END IF;
94
 
95
     -- RESULT PROCEDURE IS CALLED BY LIBRARY TASK.
96
 
97
END C94004B;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.