1-- C97305B.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-- TIMED 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 33with Impdef; 34WITH REPORT; USE REPORT; 35WITH SYSTEM; USE SYSTEM; 36PROCEDURE C97305B IS 37 38 RENDEZVOUS_OCCURRED : BOOLEAN := FALSE; 39 STATEMENTS_AFTER_CALL_EXECUTED : BOOLEAN := FALSE; 40 COUNT : POSITIVE := 1; 41 ZERO : DURATION := 1.0; 42 43 44BEGIN 45 46 TEST ("C97305B", "CHECK THAT IF THE RENDEZVOUS IS IMMEDIATELY " & 47 "POSSIBLE (FOR A TIMED ENTRY CALL), IT " & 48 "IS PERFORMED"); 49 50 IF EQUAL (3, 3) THEN 51 ZERO := 0.0; 52 END IF; 53 54 DECLARE 55 56 TASK T IS 57 ENTRY E (1..3) (B : IN OUT BOOLEAN); 58 END T; 59 60 TASK BODY T IS 61 BEGIN 62 SELECT 63 ACCEPT E (2) (B : IN OUT BOOLEAN) DO 64 B := IDENT_BOOL (TRUE); 65 END E; 66 OR 67 ACCEPT E (3) (B : IN OUT BOOLEAN); 68 FAILED ("NONEXISTENT ENTRY CALL ACCEPTED"); 69 END SELECT; 70 END T; 71 72 BEGIN 73 74 WHILE NOT STATEMENTS_AFTER_CALL_EXECUTED LOOP 75 DELAY 1.0 * Impdef.One_Second; 76 77 SELECT 78 T.E (2) (RENDEZVOUS_OCCURRED); 79 STATEMENTS_AFTER_CALL_EXECUTED := IDENT_BOOL (TRUE); 80 OR 81 DELAY ZERO; 82 IF COUNT < 60 * 60 THEN 83 COUNT := COUNT + 1; 84 ELSE 85 FAILED ("NO RENDEZVOUS AFTER AT LEAST ONE " & 86 "HOUR ELAPSED"); 87 EXIT; 88 END IF; 89 END SELECT; 90 END LOOP; 91 92 END; 93 94 IF NOT RENDEZVOUS_OCCURRED THEN 95 FAILED ("RENDEZVOUS DID NOT OCCUR"); 96 END IF; 97 98 IF COUNT > 1 THEN 99 COMMENT ("DELAYED" & POSITIVE'IMAGE(COUNT) & " SECONDS"); 100 END IF; 101 102 RESULT; 103 104END C97305B; 105