1-- C97303A.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 A TIMED_ENTRY_CALL CAN APPEAR IN PLACES WHERE A 26-- SELECTIVE_WAIT CANNOT. 27 28-- PART 1: PACKAGE BODY EMBEDDED IN TASK BODY. 29 30 31-- RM 4/06/1982 32 33with Impdef; 34WITH REPORT; 35USE REPORT; 36PROCEDURE C97303A IS 37 38 39BEGIN 40 41 42 TEST ( "C97303A" , "CHECK THAT A TIMED_ENTRY_CALL CAN" & 43 " APPEAR WHERE A SELECTIVE_WAIT CANNOT" ); 44 45 46 ------------------------------------------------------------------- 47 48 49 DECLARE 50 51 52 TASK TT IS 53 ENTRY A ( AUTHORIZED : IN BOOLEAN ); 54 END TT ; 55 56 57 TASK BODY TT IS 58 59 PACKAGE WITHIN_TASK_BODY IS 60 -- NOTHING HERE 61 END WITHIN_TASK_BODY ; 62 63 64 PACKAGE BODY WITHIN_TASK_BODY IS 65 BEGIN 66 67 SELECT -- NOT A SELECTIVE_WAIT 68 A ( FALSE ) ; -- CALLING (OWN) ENTRY 69 OR 70 DELAY 1.0 * Impdef.One_Second; 71 COMMENT( "ALTERNATIVE BRANCH TAKEN" ); 72 END SELECT; 73 74 END WITHIN_TASK_BODY ; 75 76 77 BEGIN 78 79 ACCEPT A ( AUTHORIZED : IN BOOLEAN ) DO 80 81 IF AUTHORIZED THEN 82 COMMENT( "AUTHORIZED ENTRY_CALL" ); 83 ELSE 84 FAILED( "UNAUTHORIZED ENTRY_CALL" ); 85 END IF; 86 87 END A ; 88 89 END TT ; 90 91 92 PACKAGE OUTSIDE_TASK_BODY IS 93 -- NOTHING HERE 94 END OUTSIDE_TASK_BODY ; 95 96 97 PACKAGE BODY OUTSIDE_TASK_BODY IS 98 BEGIN 99 100 SELECT -- NOT A SELECTIVE_WAIT 101 TT.A ( FALSE ) ; -- UNBORN 102 OR 103 DELAY 2.0 * Impdef.One_Second; 104 COMMENT( "(OUT:) ALTERNATIVE BRANCH TAKEN" ); 105 END SELECT; 106 107 END OUTSIDE_TASK_BODY ; 108 109 110 BEGIN 111 112 TT.A ( TRUE ); 113 114 EXCEPTION 115 116 WHEN TASKING_ERROR => 117 FAILED( "TASKING ERROR" ); 118 119 END ; 120 121 122 ------------------------------------------------------------------- 123 124 125 RESULT ; 126 127 128END C97303A ; 129