+2017-01-06 Tristan Gingold <gingold@adacore.com>
+
+ * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
+ Gnat_Extended_Ravenscar.
+ * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
+
+2017-01-06 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_util.ads: Minor typo fix and reformatting.
+
2017-01-06 Yannick Moy <moy@adacore.com>
* ghost.adb Minor fixing of references to SPARK RM.
if Has_Entries (Prot_Typ) then
declare
- Need_Array : Boolean := False;
- Maxs : List_Id;
Count : Int;
Item : Entity_Id;
- Maxs_Id : Entity_Id;
Max_Vals : Node_Id;
+ Maxes : List_Id;
+ Maxes_Id : Entity_Id;
+ Need_Array : Boolean := False;
begin
-- First check if there is any Max_Queue_Length pragma
- Item := First_Entity (Prot_Typ);
+ Item := First_Entity (Prot_Typ);
while Present (Item) loop
if Is_Entry (Item) and then Has_Max_Queue_Length (Item) then
Need_Array := True;
exit;
end if;
+
Next_Entity (Item);
end loop;
-- queue length.
if Need_Array then
- Maxs := New_List;
Count := 0;
Item := First_Entity (Prot_Typ);
+ Maxes := New_List;
while Present (Item) loop
if Is_Entry (Item) then
Count := Count + 1;
- Append_To (Maxs,
- Make_Integer_Literal (Loc,
- Get_Max_Queue_Length (Item)));
+ Append_To (Maxes,
+ Make_Integer_Literal
+ (Loc, Get_Max_Queue_Length (Item)));
end if;
Next_Entity (Item);
-- Create the declaration of the array object. Generate:
- -- Maxs_Id : aliased Protected_Entry_Queue_Max_Array
- -- (1 .. Count) := (..., ...);
+ -- Maxes_Id : aliased Protected_Entry_Queue_Max_Array
+ -- (1 .. Count) := (..., ...);
- Maxs_Id :=
+ Maxes_Id :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Prot_Typ), 'B'));
Max_Vals :=
Make_Object_Declaration (Loc,
- Defining_Identifier => Maxs_Id,
+ Defining_Identifier => Maxes_Id,
Aliased_Present => True,
Constant_Present => True,
Object_Definition =>
Make_Range (Loc,
Make_Integer_Literal (Loc, 1),
Make_Integer_Literal (Loc, Count))))),
- Expression => Make_Aggregate (Loc, Maxs));
+ Expression => Make_Aggregate (Loc, Maxes));
- -- A pointer to this array will be placed in the
- -- corresponding record by its initialization procedure so
- -- this needs to be analyzed here.
+ -- A pointer to this array will be placed in the corresponding
+ -- record by its initialization procedure so this needs to be
+ -- analyzed here.
Insert_After (Current_Node, Max_Vals);
Current_Node := Max_Vals;
Analyze (Max_Vals);
- Set_Entry_Max_Queue_Lengths_Array (Prot_Typ, Maxs_Id);
+ Set_Entry_Max_Queue_Lengths_Array (Prot_Typ, Maxes_Id);
end if;
end;
end if;
raise Program_Error;
end case;
- -- Entry_Queue_Maxs parameter. This is an access to an array of
+ -- Entry_Queue_Maxes parameter. This is an access to an array of
-- naturals representing the entry queue maximums for each entry
-- in the protected type. Zero represents no max. The access is
-- null if there is no limit for all entries (usual case).
No_Asynchronous_Control => True,
No_Dynamic_Attachment => True,
No_Dynamic_Priorities => True,
- No_Entry_Queue => True,
No_Local_Protected_Objects => True,
No_Protected_Type_Allocators => True,
No_Requeue_Statements => True,
-----------------------------------
procedure Initialize_Protection_Entries
- (Object : Protection_Entries_Access;
- Ceiling_Priority : Integer;
- Compiler_Info : System.Address;
- Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access;
- Entry_Bodies : Protected_Entry_Body_Access;
- Find_Body_Index : Find_Body_Index_Access)
+ (Object : Protection_Entries_Access;
+ Ceiling_Priority : Integer;
+ Compiler_Info : System.Address;
+ Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
+ Entry_Bodies : Protected_Entry_Body_Access;
+ Find_Body_Index : Find_Body_Index_Access)
is
Init_Priority : Integer := Ceiling_Priority;
Self_ID : constant Task_Id := STPO.Self;
Initialize_Lock (Init_Priority, Object.L'Access);
Initialization.Undefer_Abort_Nestable (Self_ID);
- Object.Ceiling := System.Any_Priority (Init_Priority);
- Object.New_Ceiling := System.Any_Priority (Init_Priority);
- Object.Owner := Null_Task;
- Object.Compiler_Info := Compiler_Info;
- Object.Pending_Action := False;
- Object.Call_In_Progress := null;
- Object.Entry_Queue_Maxs := Entry_Queue_Maxs;
- Object.Entry_Bodies := Entry_Bodies;
- Object.Find_Body_Index := Find_Body_Index;
+ Object.Ceiling := System.Any_Priority (Init_Priority);
+ Object.New_Ceiling := System.Any_Priority (Init_Priority);
+ Object.Owner := Null_Task;
+ Object.Compiler_Info := Compiler_Info;
+ Object.Pending_Action := False;
+ Object.Call_In_Progress := null;
+ Object.Entry_Queue_Maxes := Entry_Queue_Maxes;
+ Object.Entry_Bodies := Entry_Bodies;
+ Object.Find_Body_Index := Find_Body_Index;
for E in Object.Entry_Queues'Range loop
Object.Entry_Queues (E).Head := null;
Entry_Queues : Protected_Entry_Queue_Array (1 .. Num_Entries);
- Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access;
- -- Access to an array of naturals representing the max value for
- -- each entry's queue length. A value of 0 signifies no max.
+ Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
+ -- Access to an array of naturals representing the max value for each
+ -- entry's queue length. A value of 0 signifies no max.
Entry_Names : Protected_Entry_Names_Access := null;
-- An array of string names which denotes entry [family member] names.
-- System.Tasking.Protected_Objects.Initialize_Protection.
procedure Initialize_Protection_Entries
- (Object : Protection_Entries_Access;
- Ceiling_Priority : Integer;
- Compiler_Info : System.Address;
- Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access;
- Entry_Bodies : Protected_Entry_Body_Access;
- Find_Body_Index : Find_Body_Index_Access);
+ (Object : Protection_Entries_Access;
+ Ceiling_Priority : Integer;
+ Compiler_Info : System.Address;
+ Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
+ Entry_Bodies : Protected_Entry_Body_Access;
+ Find_Body_Index : Find_Body_Index_Access);
-- Initialize the Object parameter so that it can be used by the runtime
-- to keep track of the runtime state of a protected object.
-- views of the same entity have the same unique defining entity:
-- * entry declaration and entry body
-- * package spec, package body, and package body stub
- -- * protected type declaration, protected body and protected body stub
+ -- * protected type declaration, protected body, and protected body stub
-- * private view and full view of a deferred constant
-- * private view and full view of a type
- -- * subprogram declaration, subprogram and subprogram body stub
- -- * task type declaration, task body and task body stub
+ -- * subprogram declaration, subprogram, and subprogram body stub
+ -- * task type declaration, task body, and task body stub
-- In other cases, return the defining entity for N.
function Unique_Entity (E : Entity_Id) return Entity_Id;