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

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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