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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97305D.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 IF THE RENDEZVOUS IS NOT IMMEDIATELY POSSIBLE BUT BECOMES
26
-- POSSIBLE BEFORE THE DELAY EXPIRES, THE TIMED ENTRY CALL IS ACCEPTED.
27
 
28
-- CASE B: ENTRY FAMILY; THE CALLED TASK IS EXECUTING A SELECTIVE WAIT.
29
 
30
-- WRG 7/13/86
31
-- PWN 11/30/94 REMOVED PRAGMA PRIORITY INSTANCES FOR ADA 9X.
32
 
33
with Impdef;
34
WITH REPORT; USE REPORT;
35
WITH SYSTEM; USE SYSTEM;
36
PROCEDURE C97305D IS
37
 
38
     RENDEZVOUS_OCCURRED            : BOOLEAN  := FALSE;
39
     STATEMENTS_AFTER_CALL_EXECUTED : BOOLEAN  := FALSE;
40
     DELAY_IN_MINUTES               : CONSTANT POSITIVE := 30;
41
 
42
 
43
BEGIN
44
 
45
     TEST ("C97305D", "CHECK THAT IF THE RENDEZVOUS IS NOT " &
46
                      "IMMEDIATELY POSSIBLE BUT BECOMES POSSIBLE " &
47
                      "BEFORE THE DELAY EXPIRES, THE TIMED ENTRY " &
48
                      "CALL IS ACCEPTED");
49
 
50
     DECLARE
51
 
52
          TASK T IS
53
               ENTRY E (1..3) (B : IN OUT BOOLEAN);
54
          END T;
55
 
56
          TASK BODY T IS
57
          BEGIN
58
               DELAY 10.0 * Impdef.One_Second;
59
 
60
               SELECT
61
                    ACCEPT E (2) (B : IN OUT BOOLEAN) DO
62
                         B := IDENT_BOOL (TRUE);
63
                    END E;
64
               OR
65
                    ACCEPT E (3) (B : IN OUT BOOLEAN);
66
                    FAILED ("NONEXISTENT ENTRY CALL ACCEPTED");
67
               END SELECT;
68
          END T;
69
 
70
     BEGIN
71
 
72
          SELECT
73
               T.E (2) (RENDEZVOUS_OCCURRED);
74
               STATEMENTS_AFTER_CALL_EXECUTED := IDENT_BOOL (TRUE);
75
          OR
76
               DELAY DELAY_IN_MINUTES * 60.0 * Impdef.One_Second;
77
               FAILED ("TIMED ENTRY CALL NOT ACCEPTED AFTER" &
78
                       POSITIVE'IMAGE(DELAY_IN_MINUTES) &
79
                       " MINUTES ELAPSED");
80
 
81
          END SELECT;
82
 
83
     END;
84
 
85
     IF NOT RENDEZVOUS_OCCURRED THEN
86
          FAILED ("RENDEZVOUS DID NOT OCCUR");
87
     END IF;
88
 
89
     IF NOT STATEMENTS_AFTER_CALL_EXECUTED THEN
90
          FAILED ("STATEMENTS AFTER ENTRY CALL NOT EXECUTED");
91
     END IF;
92
 
93
     RESULT;
94
 
95
END C97305D;

powered by: WebSVN 2.1.0

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