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/] [c9a009c.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C9A009C.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
-- TEST ABORT DURING RENDEZVOUS
26
 
27
-- THE CALLING TASK IN THE RENDEVOUS IS DEPENDENT ON THE ABORTED TASK,
28
-- SO THE DEPENDENT TASK IS INDIRECTLY ABORTED WHILE IN A RENDEVOUS;
29
-- NEITHER THE CALLING TASK NOR ITS MASTER CAN BE TERMINATED WHILE THE
30
-- RENDEVOUS CONTINUES.
31
 
32
-- JEAN-PIERRE ROSEN 09 MARCH 1984
33
-- JBG 6/1/84
34
 
35
WITH SYSTEM; USE SYSTEM;
36
WITH REPORT; USE REPORT;
37
PROCEDURE C9A009C IS
38
 
39
BEGIN
40
 
41
     TEST("C9A009C", "DEPENDENT TASK IN RENDEVOUS WHEN MASTER IS " &
42
                     "ABORTED");
43
 
44
     DECLARE
45
     -- T2 CONTAINS DEPENDENT TASK T3 WHICH CALLS T1.
46
     -- T1 ABORTS T2 WHILE IN RENDEVOUS WITH T3.
47
 
48
          TASK T1 IS
49
               ENTRY E1;
50
          END T1;
51
 
52
          TASK BODY T1 IS
53
 
54
               TASK T2;
55
 
56
               TASK BODY T2 IS
57
                    TASK T3;
58
                    TASK BODY T3 IS
59
                    BEGIN
60
                         T1.E1;
61
                         FAILED ("T3 NOT ABORTED");
62
                    EXCEPTION
63
                         WHEN TASKING_ERROR =>
64
                              FAILED ("TASKING_ERROR IN T3");
65
                         WHEN OTHERS =>
66
                              FAILED ("OTHER EXCEPTION IN T3");
67
                    END;
68
               BEGIN     -- T3 ACTIVATED NOW
69
                    NULL;
70
               END T2;
71
 
72
          BEGIN     -- T1
73
               ACCEPT E1 DO
74
                    ABORT T2;
75
                    ABORT T2;
76
                    ABORT T2; -- WHY NOT?
77
                    IF T2'TERMINATED THEN
78
                         FAILED ("T2 TERMINATED PREMATURELY");
79
                    END IF;
80
               END E1;
81
          EXCEPTION
82
               WHEN TASKING_ERROR =>
83
                    FAILED ("TASKING_ERROR IN T1 BECAUSE CALLING TASK "&
84
                            "WAS ABORTED");
85
               WHEN OTHERS =>
86
                    FAILED ("OTHER EXCEPTION - T1");
87
          END T1;
88
 
89
     BEGIN
90
          NULL;
91
     END;
92
 
93
     RESULT;
94
 
95
END C9A009C;

powered by: WebSVN 2.1.0

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