Commit 637da456 by Robert Dewar Committed by Arnaud Charlet

osint.adb, [...]: Minor reformatting.

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* osint.adb, a-rttiev.adb: Minor reformatting.

From-SVN: r154808
parent cca5ded0
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 * gnat_rm.texi: Remove list of warning letters, and refer instead to
using gnatmake to get a brief list. using gnatmake to get a brief list.
......
...@@ -75,9 +75,9 @@ package body Ada.Real_Time.Timing_Events is ...@@ -75,9 +75,9 @@ package body Ada.Real_Time.Timing_Events is
-- with mutually exclusive access via Event_Queue_Lock. -- with mutually exclusive access via Event_Queue_Lock.
procedure Remove_From_Queue (This : Any_Timing_Event); procedure Remove_From_Queue (This : Any_Timing_Event);
-- Remove the specified event pointer from the queue of pending events -- Remove the specified event pointer from the queue of pending events with
-- with mutually exclusive access via Event_Queue_Lock. -- mutually exclusive access via Event_Queue_Lock. This procedure is used
-- This procedure is used by the client-side routines (Set_Handler, etc.). -- by the client-side routines (Set_Handler, etc.).
----------- -----------
-- Timer -- -- Timer --
...@@ -94,6 +94,7 @@ package body Ada.Real_Time.Timing_Events is ...@@ -94,6 +94,7 @@ package body Ada.Real_Time.Timing_Events is
-- selected is arbitrary and could be changed to suit the application -- selected is arbitrary and could be changed to suit the application
-- requirements. Obviously a shorter period would give better resolution -- requirements. Obviously a shorter period would give better resolution
-- at the cost of more overhead. -- at the cost of more overhead.
begin begin
System.Tasking.Utilities.Make_Independent; System.Tasking.Utilities.Make_Independent;
...@@ -171,6 +172,7 @@ package body Ada.Real_Time.Timing_Events is ...@@ -171,6 +172,7 @@ package body Ada.Real_Time.Timing_Events is
declare declare
Handler : constant Timing_Event_Handler := Next_Event.Handler; Handler : constant Timing_Event_Handler := Next_Event.Handler;
begin begin
-- The first act is to clear the event, per D.15(13/2). Besides, -- The first act is to clear the event, per D.15(13/2). Besides,
-- we cannot clear the handler pointer *after* invoking the -- we cannot clear the handler pointer *after* invoking the
...@@ -205,11 +207,17 @@ package body Ada.Real_Time.Timing_Events is ...@@ -205,11 +207,17 @@ package body Ada.Real_Time.Timing_Events is
package By_Timeout is new Events.Generic_Sorting (Sooner); package By_Timeout is new Events.Generic_Sorting (Sooner);
-- Used to keep the events in ascending order by timeout value -- Used to keep the events in ascending order by timeout value
------------
-- Sooner --
------------
function Sooner (Left, Right : Any_Timing_Event) return Boolean is function Sooner (Left, Right : Any_Timing_Event) return Boolean is
begin begin
return Left.Timeout < Right.Timeout; return Left.Timeout < Right.Timeout;
end Sooner; end Sooner;
-- Start of processing for Insert_Into_Queue
begin begin
SSL.Abort_Defer.all; SSL.Abort_Defer.all;
...@@ -236,12 +244,14 @@ package body Ada.Real_Time.Timing_Events is ...@@ -236,12 +244,14 @@ package body Ada.Real_Time.Timing_Events is
procedure Remove_From_Queue (This : Any_Timing_Event) is procedure Remove_From_Queue (This : Any_Timing_Event) is
use Events; use Events;
Location : Cursor; Location : Cursor;
begin begin
SSL.Abort_Defer.all; SSL.Abort_Defer.all;
Write_Lock (Event_Queue_Lock'Access); Write_Lock (Event_Queue_Lock'Access);
Location := All_Events.Find (This); Location := All_Events.Find (This);
if Location /= No_Element then if Location /= No_Element then
All_Events.Delete (Location); All_Events.Delete (Location);
end if; end if;
...@@ -332,13 +342,9 @@ package body Ada.Real_Time.Timing_Events is ...@@ -332,13 +342,9 @@ package body Ada.Real_Time.Timing_Events is
function Time_Of_Event (Event : Timing_Event) return Time is function Time_Of_Event (Event : Timing_Event) return Time is
begin 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 (if Event.Handler = null then Time_First else Event.Timeout);
return Time_First;
else
return Event.Timeout;
end if;
end Time_Of_Event; end Time_Of_Event;
-------------- --------------
......
...@@ -1081,7 +1081,8 @@ package body Osint is ...@@ -1081,7 +1081,8 @@ package body Osint is
function File_Time_Stamp function File_Time_Stamp
(Name : Path_Name_Type; (Name : Path_Name_Type;
Attr : access File_Attributes) return Time_Stamp_Type is Attr : access File_Attributes) return Time_Stamp_Type
is
begin begin
if Name = No_Path then if Name = No_Path then
return Empty_Time_Stamp; return Empty_Time_Stamp;
...@@ -1090,7 +1091,7 @@ package body Osint is ...@@ -1090,7 +1091,7 @@ package body Osint is
Get_Name_String (Name); Get_Name_String (Name);
Name_Buffer (Name_Len + 1) := ASCII.NUL; Name_Buffer (Name_Len + 1) := ASCII.NUL;
return OS_Time_To_GNAT_Time 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;
---------------- ----------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment