------------------------------------------------------------------------------ -- -- -- POSIX ADA LANGUAGE INTERFACES COMPONENTS -- -- -- -- P O S I X . A S Y N C H R O N O U S _ I O -- -- -- -- S p e c -- -- -- -- $Revision: 1.4 $ -- -- -- -- -- -- This package specification is part of the Florida State -- -- University (FSU) prototype implementation of IEEE Draft Std -- -- 1003.5b, for use with the Gnu NYU Ada Translator (GNAT) and the -- -- FSU Gnu Ada Runtime Library (GNARL). -- -- -- -- This package specification contains some text extracted from IEEE -- -- Draft Std 1003.5b/D5 (August 1995), IEEE Draft Standard for -- -- Information Technology -- POSIX Ada Language Interfaces -- Part 1: -- -- Binding for System Application Program Interface, Amendment 1: -- -- Realtime Extensions, copyright 1995 by the Institute of Electrical -- -- and Electronics Engineers, Inc. -- -- -- -- This package specification differs from the package specifications -- -- in IEEE Draft Std 1003.5/D5 in several respects. For example, it -- -- includes additional with-clause dependences, comments, and -- -- complete definitions for certain types, ranges, and constants that -- -- are left implementation-defined in the draft standard. These -- -- differences appear to be within the scope of variation which the -- -- draft standard permits for implementations, but no warranty is -- -- made to that effect. -- -- -- -- These package specifications are distributed in the hope that they -- -- will be useful, but WITHOUT ANY WARRANTY; without even the implied -- -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- The package specifications in IEEE Draft Std 1003.5b/D5 represent -- -- only a portion of the document and are not to be interpreteted -- -- outside the context of the document, nor is the draft document to -- -- be interpreted as an approved consensus standard. -- -- -- -- When IEEE Std 1003.5b is approved, it must be used in conjunction -- -- with the final version of the package specifications contained in -- -- that document in order to claim conformance. The IEEE takes no -- -- responsibility for and will assume no liability for damages -- -- resulting from the reader's misinterpretation of said information -- -- resulting from its out-of-context nature. To order copies of the -- -- IEEE Draft Std 1003.5/D5, please contact the IEEE Service Center -- -- at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via -- -- phone at 1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667. -- -- -- -- For bodies to these packages, and other free products of the FSU -- -- POSIX/Ada Real-Time project, see the ftp site "ftp.cs.fsu.edu", -- -- subdirectory "pub/PART", or send e-mail to "part@ada.cs.fsu.edu". -- -- -- ------------------------------------------------------------------------------ with Ada.Streams, POSIX, POSIX.IO, POSIX.Signals, Interfaces.C, Implementation_Defined; package POSIX.Asynchronous_IO is type AIO_Descriptor is private; function Create_AIO_Control_Block return AIO_Descriptor; procedure Destroy_AIO_Control_Block (AD : in out AIO_Descriptor); -- AIO Control Block Attributes -- type List_IO_Operations is (No_Op, Read, Write); type IO_Array_Pointer is access Ada_Streams.Stream_Element_Array; function Get_File (AD : AIO_Descriptor) return POSIX.IO.File_Descriptor; procedure Set_File (AD : in AIO_Descriptor; File : in POSIX.IO.File_Descriptor); function Get_Offset (AD : AIO_Descriptor) return POSIX.IO.IO_Offset; procedure Set_Offset (AD : in AIO_Descriptor; Offset : in POSIX.IO.IO_Offset); function Get_Buffer (AD : AIO_Descriptor) return IO_Array_Pointer; procedure Set_Buffer (AD : in AIO_Descriptor; Buffer : in IO_Array_Pointer); function Get_Length (AD : AIO_Descriptor) return POSIX.IO_Count; procedure Set_Length (AD : in AIO_Descriptor; Length : in POSIX.IO_Count); function Get_Priority_Reduction (AD : AIO_Descriptor) return Natural; procedure Set_Priority_Reduction (AD : in AIO_Descriptor; Priority_Reduction : in Natural); function Get_Event (AD : AIO_Descriptor) return POSIX.Signals.Signal_Event; procedure Set_Event (AD : in AIO_Descriptor; Event : in POSIX.Signals.Signal_Event); function Get_Operation (AD : AIO_Descriptor) return List_IO_Operations; procedure Set_Operation (AD : in AIO_Descriptor; Operation : in List_IO_Operations); -- AIO read and write -- procedure Read (AD : in AIO_Descriptor); procedure Write (AD : in AIO_Descriptor); type AIO_Descriptor_List is array (Positive range <>) of AIO_Descriptor; procedure List_IO_No_Wait (List : in out AIO_Descriptor_List; Event : in POSIX.Signals.Signal_Event); procedure List_IO_Wait (List : in out AIO_Descriptor_List; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); -- AIO status -- type AIO_Status is (In_Progress, Completed_Successfully, Canceled); function Get_AIO_Status (AD : AIO_Descriptor) return AIO_Status; function Get_AIO_Status (AD : AIO_Descriptor) return POSIX.Error_Code; function Get_Bytes_Transferred (AD : AIO_Descriptor) return POSIX.IO_Count; type Cancelation_Status is (Canceled, Not_Canceled, All_Done); function Cancel (AD : AIO_Descriptor) return Cancelation_Status; function Cancel (File : POSIX.IO.File_Descriptor) return Cancelation_Status; procedure Await_IO_Or_Timeout (AD : in AIO_Descriptor; Timeout : in POSIX.Timespec; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); procedure Await_IO (AD : in AIO_Descriptor; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); procedure Await_IO_Or_Timeout (List : in AIO_Descriptor_List; Timeout : in POSIX.Timespec; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); procedure Await_IO (List : in AIO_Descriptor_List; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); procedure Synchronize_File (AD : in AIO_Descriptor); procedure Synchronize_Data (AD : in AIO_Descriptor); private type AIO_Descriptor is access Implementation_Defined.aiocb_t; end POSIX.Asynchronous_IO;