-- LXD70051.A -- -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- -- OBJECTIVE: -- See LXD70052.AM. -- -- TEST FILES: -- This test consists of the following files: -- LXD70050.A A text file containing the Restrictions pragma -- => LXD70051.A A package which uses task allocators -- LXD70052.AM The main program -- -- CHANGE HISTORY: -- 06 Dec 94 SAIC ACVC 2.0 -- 30 Sep 96 SAIC Multi-file prolog convention fix. -- 02 Feb 17 RLB Added missing error tag (and location indicator). -- --! package LXD70051 is task type Line_Driver is entry Input; end Line_Driver; type acc_Driver is access Line_Driver; task Close_Control is entry Normal_Shut_Down; entry Disaster_Shut_Down; end Close_Control; end LXD70051; package body LXD70051 is subtype Driver_Index is integer range 1..4; task body Line_Driver is begin loop accept Input do null; -- Application code end Input; end loop; end Line_Driver; -- Create a group of Line_Driver tasks Driver_Array : array (Driver_Index) of acc_Driver := (Driver_Index => new Line_Driver); -- OPTIONAL ERROR: {36;2} -- The allocations violate the restriction No_Task_Allocators. task body Close_Control is begin select accept Normal_Shut_Down do null; -- Application code end Normal_Shut_Down; or accept Disaster_Shut_Down do null; -- Application code for i in Driver_Index loop abort Driver_Array(i).all; end loop; end Disaster_Shut_Down; end select; end Close_Control; begin -- LXD70051 null; end LXD70051;