-- LXD70011.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 LXD70012.AM. -- -- TEST FILES: -- This test consists of the following files: -- LXD70010.A A text file with the Restrictions pragma -- => LXD70011.A A Library task with several children -- LXD70012.AM The main program -- -- CHANGE HISTORY: -- 06 Dec 94 SAIC ACVC 2.0 -- 10 Nov 95 SAIC ACVC 2.0.1 - added hierarchy to tasks -- 30 Sep 96 SAIC Multi-file prolog convention fix. -- --! package LXD70011 is task Driver_Control is entry Normal_Shut_Down; entry Disaster_Shut_Down; end Driver_Control; end LXD70011; package body LXD70011 is subtype Driver_Index is integer range 1..4; task body Driver_Control is task type Line_Driver is entry Input; end Line_Driver; type acc_Driver is access Line_Driver; -- Create a group of Line_Driver tasks. These tasks are children of -- the Driver_Control and thus establish a hierarchy of tasks Driver_Array : array (Driver_Index) of acc_Driver := (Driver_Index => new Line_Driver); task body Line_Driver is begin loop accept Input do null; -- Application code end Input; end loop; end Line_Driver; 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 Driver_Control; begin -- LXD70011 null; end LXD70011;