Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/ada/acats/tests/c9/c9a009f.ada @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 -- C9A009F.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 TASK ABORTED DURING AN ENTRY CALL IS NOT TERMINATED | |
26 -- BEFORE THE END OF THE RENDEZVOUS. | |
27 | |
28 -- JEAN-PIERRE ROSEN 16-MAR-1984 | |
29 -- JBG 6/1/84 | |
30 -- PWN 11/30/94 REMOVED PRAGMA PRIORITY INSTANCES FOR ADA 9X. | |
31 | |
32 WITH REPORT,SYSTEM; | |
33 USE REPORT,SYSTEM; | |
34 PROCEDURE C9A009F IS | |
35 | |
36 | |
37 TASK BLOCKING IS | |
38 ENTRY START; | |
39 ENTRY STOP; | |
40 ENTRY RESTART; | |
41 ENTRY NO_CALL; | |
42 END BLOCKING; | |
43 | |
44 TASK BODY BLOCKING IS | |
45 BEGIN | |
46 SELECT | |
47 ACCEPT STOP DO | |
48 ACCEPT START; | |
49 ACCEPT RESTART; | |
50 END; | |
51 OR TERMINATE; | |
52 END SELECT; | |
53 END; | |
54 | |
55 BEGIN | |
56 | |
57 TEST("C9A009F", "ABORTED TASK NOT TERMINATED BEFORE END OF " & | |
58 "RENDEVOUS"); | |
59 | |
60 DECLARE -- T1 ABORTED WHILE IN RENDEVOUS WITH BLOCKING. | |
61 | |
62 TASK T1 IS | |
63 END T1; | |
64 TASK BODY T1 IS | |
65 BEGIN | |
66 BLOCKING.STOP; | |
67 FAILED ("T1 NOT ABORTED"); | |
68 END; | |
69 | |
70 BEGIN | |
71 BLOCKING.START; -- ALLOWS T1 TO ENTER RENDEVOUS | |
72 | |
73 ABORT T1; | |
74 | |
75 IF T1'CALLABLE THEN | |
76 FAILED("T1 STILL CALLABLE - 1"); | |
77 END IF; | |
78 | |
79 IF T1'TERMINATED THEN -- T1 STILL IN RENDEVOUS | |
80 FAILED("T1 PREMATURELY TERMINATED - 1"); | |
81 END IF; | |
82 | |
83 BLOCKING.RESTART; | |
84 END; | |
85 | |
86 RESULT; | |
87 | |
88 END C9A009F; |