Commit 6413509b by Arnaud Charlet

Minor reformatting.

From-SVN: r244131
parent 07b3e137
...@@ -2020,7 +2020,6 @@ package body Exp_Util is ...@@ -2020,7 +2020,6 @@ package body Exp_Util is
----------------------------------- -----------------------------------
function Corresponding_Runtime_Package (Typ : Entity_Id) return RTU_Id is function Corresponding_Runtime_Package (Typ : Entity_Id) return RTU_Id is
function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean; function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean;
-- Return True if protected type T has one entry and the maximum queue -- Return True if protected type T has one entry and the maximum queue
-- length is one. -- length is one.
...@@ -2030,37 +2029,43 @@ package body Exp_Util is ...@@ -2030,37 +2029,43 @@ package body Exp_Util is
-------------------------------- --------------------------------
function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean is function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean is
Item : Entity_Id;
Is_First : Boolean := True; Is_First : Boolean := True;
Ent : Entity_Id;
begin begin
Ent := First_Entity (T); Item := First_Entity (T);
while Present (Ent) loop while Present (Item) loop
if Is_Entry (Ent) then if Is_Entry (Item) then
if not Is_First then
-- More than one entry
-- The protected type has more than one entry
if not Is_First then
return False; return False;
end if; end if;
-- The queue length is not one
if not Restriction_Active (No_Entry_Queue) if not Restriction_Active (No_Entry_Queue)
and then Get_Max_Queue_Length (Ent) /= Uint_1 and then Get_Max_Queue_Length (Item) /= Uint_1
then then
-- Max queue length is not 1
return False; return False;
end if; end if;
Is_First := False; Is_First := False;
end if; end if;
Ent := Next_Entity (Ent); Next_Entity (Item);
end loop; end loop;
return True; return True;
end Has_One_Entry_And_No_Queue; end Has_One_Entry_And_No_Queue;
-- Local variables
Pkg_Id : RTU_Id := RTU_Null; Pkg_Id : RTU_Id := RTU_Null;
-- Start of processing for Corresponding_Runtime_Package
begin begin
pragma Assert (Is_Concurrent_Type (Typ)); pragma Assert (Is_Concurrent_Type (Typ));
......
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