------------------------------------------------------------------------ -- These package specifications were extracted from IEEE Std 1003.5-1992, -- IEEE Standard for Information Technology--POSIX Ada Language -- Interfaces--Part 1: Binding System Application Program Interface, -- copyright (c)1992 by the Institute of Electrical and Electronics -- Engineers, Inc. These package specifications represent only a portion -- of the document and are not to be interpreteted as the approved -- consensus standard. The IEEE Std 1003.5-1992 must be used in -- conjunction with these package specifications in order to claim -- conformance. The IEEE takes no responsibility for and will assume no -- liability for damages resulting from the reader's misinpretation of -- said information resulting from its out of context nature. To order -- copies of the IEEE Std 1003.5-1992, 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. ------------------------------------------------------------------------ with POSIX, POSIX_IO, POSIX_Process_Identification; package POSIX_File_Locking is type Lock_Kind is (Read_Lock, Write_Lock, Unlock); type File_Lock (Whole_File: Boolean := True) is record Lock : Lock_Kind; case Whole_File is when True => null; when False => Starting_Point : POSIX_IO.Position; Start : POSIX_IO.IO_Offset; Length : POSIX.IO_Count; end case; end record; procedure Get_Lock (File : in POSIX_IO.File_descriptor; Lock : in File_Lock; Result : out File_Lock; Process : out POSIX_Process_Identification.Process_ID); procedure Set_Lock (File : in POSIX_IO.File_Descriptor; Lock : in File_Lock); procedure Wait_To_Set_Lock (File : in POSIX_IO.File_Descriptor; Lock : in File_Lock; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); end POSIX_File_Locking;