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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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