OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c94004c.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C94004C.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 C:  TASK OBJECT DECLARED IN LIBRARY PACKAGE USED BY MAIN PROGRAM
30
--          AND WAITING AT A SELECTIVE WAIT WITH TERMINATE.
31
 
32
-- JRK 10/8/81
33
-- SPS 11/21/82
34
-- JBG 12/6/84
35
-- JRK 11/21/85  RENAMED FROM C94004C-B.ADA; REVISED ACCORDING TO
36
--               AI-00399.
37
-- JRK 10/24/86  RENAMED FROM E94004C-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 C94004C_PKG IS
43
 
44
     TASK TYPE TT IS
45
          ENTRY E;
46
     END TT;
47
 
48
END C94004C_PKG;
49
 
50
with Impdef;
51
WITH REPORT; USE REPORT;
52
PRAGMA ELABORATE (REPORT);
53
PACKAGE BODY C94004C_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
          -- USE LOOP FOR SELECTIVE WAIT WITH TERMINATE.
64
          LOOP
65
               SELECT
66
                    ACCEPT E;
67
               OR
68
                    TERMINATE;
69
               END SELECT;
70
          END LOOP;
71
          -- FAILS IF JOB HANGS UP WITHOUT TERMINATING.
72
     END TT;
73
 
74
END C94004C_PKG;
75
 
76
WITH C94004C_PKG; USE C94004C_PKG;
77
PRAGMA ELABORATE (C94004C_PKG);
78
PACKAGE C94004C_TASK IS
79
     T : TT;
80
END;
81
 
82
WITH SYSTEM; USE SYSTEM;
83
WITH REPORT; USE REPORT;
84
WITH C94004C_TASK;
85
PROCEDURE C94004C IS
86
 
87
 
88
BEGIN
89
     TEST ("C94004C", "CHECK THAT A MAIN PROGRAM TERMINATES " &
90
                      "WITHOUT WAITING FOR TASKS THAT DEPEND " &
91
                      "ON A LIBRARY PACKAGE AND THAT SUCH TASKS " &
92
                      "CONTINUE TO EXECUTE");
93
 
94
     COMMENT ("THE INVOKING SYSTEM'S JOB CONTROL LOG MUST BE " &
95
              "EXAMINED TO SEE IF THIS TEST REALLY TERMINATES");
96
 
97
     C94004C_TASK.T.E;      -- ALLOW TASK TO PROCEED.
98
     IF C94004C_TASK.T'TERMINATED THEN
99
          FAILED ("LIBRARY DECLARED TASK PREMATURELY TERMINATED");
100
     END IF;
101
 
102
     -- RESULT PROCEDURE IS CALLED BY LIBRARY TASK.
103
 
104
END C94004C;

powered by: WebSVN 2.1.0

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