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

powered by: WebSVN 2.1.0

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