-2019-10-10 Ed Schonberg <schonberg@adacore.com>
+2019-10-10 Bob Duff <duff@adacore.com>
- * sem_cat.adb (Set_Categorization_From_Pragma): Do not modify
- any visibility settings if there are no compilation_unit pragmas
- following the package declaration. Add comments for future
- cleanup.
\ No newline at end of file
+ * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
+ libgnat/a-cbhase.adb, libgnat/a-cbmutr.adb,
+ libgnat/a-cborma.adb, libgnat/a-cborse.adb,
+ libgnat/a-cdlili.adb, libgnat/a-cidlli.adb,
+ libgnat/a-cihama.adb, libgnat/a-cihase.adb,
+ libgnat/a-cimutr.adb, libgnat/a-ciorma.adb,
+ libgnat/a-ciorse.adb, libgnat/a-cobove.adb,
+ libgnat/a-cohama.adb, libgnat/a-cohase.adb,
+ libgnat/a-coinve.adb, libgnat/a-comutr.adb,
+ libgnat/a-conhel.adb, libgnat/a-convec.adb,
+ libgnat/a-coorma.adb, libgnat/a-coorse.adb (Reference,
+ Constant_Reference): Use Busy instead of Lock, so we forbid
+ tampering with cursors, rather than tampering with elements.
\ No newline at end of file
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Old_Pos => Position,
Old_Hash => Hash (Key (Position))))
do
- Lock (Container.TC);
+ Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
Old_Pos => P,
Old_Hash => Hash (Key)))
do
- Lock (Container.TC);
+ Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
(Element => Container.Elements (Position.Node)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Container.Elements (Position.Node)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => N.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Pos => Position,
Old_Key => new Key_Type'(Key (Position))))
do
- Lock (Container.TC);
+ Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
Pos => Find (Container, Key),
Old_Key => new Key_Type'(Key)))
do
- Lock (Container.TC);
+ Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Old_Pos => Position,
Old_Hash => Hash (Key (Position))))
do
- Lock (HT.TC);
+ Busy (HT.TC);
end return;
end;
end Reference_Preserving_Key;
Old_Pos => P,
Old_Hash => Hash (Key)))
do
- Lock (HT.TC);
+ Busy (HT.TC);
end return;
end;
end Reference_Preserving_Key;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.Tree.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element.all'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Pos => Position,
Old_Key => new Key_Type'(Key (Position))))
do
- Lock (Tree.TC);
+ Busy (Tree.TC);
end return;
end;
end Reference_Preserving_Key;
Pos => Find (Container, Key),
Old_Key => new Key_Type'(Key)))
do
- Lock (Tree.TC);
+ Busy (Tree.TC);
end return;
end;
end Reference_Preserving_Key;
Container.Tree.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => A (J)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => A (J)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => A (J)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => A (J)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Old_Pos => Position,
Old_Hash => Hash (Key (Position))))
do
- Lock (HT.TC);
+ Busy (HT.TC);
end return;
end;
end Reference_Preserving_Key;
Old_Pos => P,
Old_Hash => Hash (Key)))
do
- Lock (HT.TC);
+ Busy (HT.TC);
end return;
end;
end Reference_Preserving_Key;
(Element => Container.Elements.EA (Position.Index),
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Container.Elements.EA (Index),
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Container.Elements.EA (Position.Index),
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Container.Elements.EA (Index),
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
procedure Adjust (Control : in out Reference_Control_Type) is
begin
if Control.T_Counts /= null then
- Lock (Control.T_Counts.all);
+ Busy (Control.T_Counts.all);
end if;
end Adjust;
procedure Finalize (Control : in out Reference_Control_Type) is
begin
if Control.T_Counts /= null then
- Unlock (Control.T_Counts.all);
+ Unbusy (Control.T_Counts.all);
Control.T_Counts := null;
end if;
end Finalize;
(Element => Container.Elements.EA (Position.Index)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Container.Elements.EA (Index)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Container.Elements.EA (Position.Index)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Container.Elements.EA (Index)'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Container.Tree.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Reference;
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end;
end Constant_Reference;
Pos => Position,
Old_Key => new Key_Type'(Key (Position))))
do
- Lock (Tree.TC);
+ Busy (Tree.TC);
end return;
end;
end Reference_Preserving_Key;
Pos => Find (Container, Key),
Old_Key => new Key_Type'(Key)))
do
- Lock (Tree.TC);
+ Busy (Tree.TC);
end return;
end;
end Reference_Preserving_Key;
Container.Tree.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
- Lock (TC.all);
+ Busy (TC.all);
end return;
end Pseudo_Reference;