* osint.adb, a-rttiev.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154808
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-11-30 Robert Dewar <dewar@adacore.com>
2009-11-30 Robert Dewar <dewar@adacore.com>
+ * osint.adb, a-rttiev.adb: Minor reformatting.
+
+2009-11-30 Robert Dewar <dewar@adacore.com>
+
* gnat_rm.texi: Remove list of warning letters, and refer instead to
using gnatmake to get a brief list.
* gnat_rm.texi: Remove list of warning letters, and refer instead to
using gnatmake to get a brief list.
-- with mutually exclusive access via Event_Queue_Lock.
procedure Remove_From_Queue (This : Any_Timing_Event);
-- with mutually exclusive access via Event_Queue_Lock.
procedure Remove_From_Queue (This : Any_Timing_Event);
- -- Remove the specified event pointer from the queue of pending events
- -- with mutually exclusive access via Event_Queue_Lock.
- -- This procedure is used by the client-side routines (Set_Handler, etc.).
+ -- Remove the specified event pointer from the queue of pending events with
+ -- mutually exclusive access via Event_Queue_Lock. This procedure is used
+ -- by the client-side routines (Set_Handler, etc.).
-- selected is arbitrary and could be changed to suit the application
-- requirements. Obviously a shorter period would give better resolution
-- at the cost of more overhead.
-- selected is arbitrary and could be changed to suit the application
-- requirements. Obviously a shorter period would give better resolution
-- at the cost of more overhead.
begin
System.Tasking.Utilities.Make_Independent;
begin
System.Tasking.Utilities.Make_Independent;
declare
Handler : constant Timing_Event_Handler := Next_Event.Handler;
declare
Handler : constant Timing_Event_Handler := Next_Event.Handler;
begin
-- The first act is to clear the event, per D.15(13/2). Besides,
-- we cannot clear the handler pointer *after* invoking the
begin
-- The first act is to clear the event, per D.15(13/2). Besides,
-- we cannot clear the handler pointer *after* invoking the
package By_Timeout is new Events.Generic_Sorting (Sooner);
-- Used to keep the events in ascending order by timeout value
package By_Timeout is new Events.Generic_Sorting (Sooner);
-- Used to keep the events in ascending order by timeout value
+ ------------
+ -- Sooner --
+ ------------
+
function Sooner (Left, Right : Any_Timing_Event) return Boolean is
begin
return Left.Timeout < Right.Timeout;
end Sooner;
function Sooner (Left, Right : Any_Timing_Event) return Boolean is
begin
return Left.Timeout < Right.Timeout;
end Sooner;
+ -- Start of processing for Insert_Into_Queue
+
begin
SSL.Abort_Defer.all;
begin
SSL.Abort_Defer.all;
procedure Remove_From_Queue (This : Any_Timing_Event) is
use Events;
Location : Cursor;
procedure Remove_From_Queue (This : Any_Timing_Event) is
use Events;
Location : Cursor;
begin
SSL.Abort_Defer.all;
Write_Lock (Event_Queue_Lock'Access);
Location := All_Events.Find (This);
begin
SSL.Abort_Defer.all;
Write_Lock (Event_Queue_Lock'Access);
Location := All_Events.Find (This);
if Location /= No_Element then
All_Events.Delete (Location);
end if;
if Location /= No_Element then
All_Events.Delete (Location);
end if;
function Time_Of_Event (Event : Timing_Event) return Time is
begin
function Time_Of_Event (Event : Timing_Event) return Time is
begin
- -- RM D.15(18/2): Time_First must be returned if the event is not set
+ -- RM D.15(18/2): Time_First must be returned in the event is not set
- if Event.Handler = null then
- return Time_First;
- else
- return Event.Timeout;
- end if;
+ return (if Event.Handler = null then Time_First else Event.Timeout);
end Time_Of_Event;
--------------
end Time_Of_Event;
--------------
function File_Time_Stamp
(Name : Path_Name_Type;
function File_Time_Stamp
(Name : Path_Name_Type;
- Attr : access File_Attributes) return Time_Stamp_Type is
+ Attr : access File_Attributes) return Time_Stamp_Type
+ is
begin
if Name = No_Path then
return Empty_Time_Stamp;
begin
if Name = No_Path then
return Empty_Time_Stamp;
Get_Name_String (Name);
Name_Buffer (Name_Len + 1) := ASCII.NUL;
return OS_Time_To_GNAT_Time
Get_Name_String (Name);
Name_Buffer (Name_Len + 1) := ASCII.NUL;
return OS_Time_To_GNAT_Time
- (File_Time_Stamp (Name_Buffer'Address, Attr));
+ (File_Time_Stamp (Name_Buffer'Address, Attr));
end File_Time_Stamp;
----------------
end File_Time_Stamp;
----------------