From 2f26abccd0f04f87e348cb0127cc24fc7265f06a Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Thu, 10 Oct 2019 15:23:08 +0000 Subject: [PATCH] [Ada] Replace in Ordered_Maps gets tampering failure 2019-10-10 Bob Duff gcc/ada/ * 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. From-SVN: r276813 --- gcc/ada/ChangeLog | 19 ++++++++++++++----- gcc/ada/libgnat/a-cbdlli.adb | 6 +++--- gcc/ada/libgnat/a-cbhama.adb | 10 +++++----- gcc/ada/libgnat/a-cbhase.adb | 10 +++++----- gcc/ada/libgnat/a-cbmutr.adb | 6 +++--- gcc/ada/libgnat/a-cborma.adb | 10 +++++----- gcc/ada/libgnat/a-cborse.adb | 10 +++++----- gcc/ada/libgnat/a-cdlili.adb | 6 +++--- gcc/ada/libgnat/a-cidlli.adb | 6 +++--- gcc/ada/libgnat/a-cihama.adb | 10 +++++----- gcc/ada/libgnat/a-cihase.adb | 10 +++++----- gcc/ada/libgnat/a-cimutr.adb | 6 +++--- gcc/ada/libgnat/a-ciorma.adb | 10 +++++----- gcc/ada/libgnat/a-ciorse.adb | 10 +++++----- gcc/ada/libgnat/a-cobove.adb | 10 +++++----- gcc/ada/libgnat/a-cohama.adb | 10 +++++----- gcc/ada/libgnat/a-cohase.adb | 10 +++++----- gcc/ada/libgnat/a-coinve.adb | 10 +++++----- gcc/ada/libgnat/a-comutr.adb | 6 +++--- gcc/ada/libgnat/a-conhel.adb | 4 ++-- gcc/ada/libgnat/a-convec.adb | 10 +++++----- gcc/ada/libgnat/a-coorma.adb | 10 +++++----- gcc/ada/libgnat/a-coorse.adb | 10 +++++----- 23 files changed, 109 insertions(+), 100 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 50654f0..745c7b5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,6 +1,15 @@ -2019-10-10 Ed Schonberg +2019-10-10 Bob Duff - * 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 diff --git a/gcc/ada/libgnat/a-cbdlli.adb b/gcc/ada/libgnat/a-cbdlli.adb index 4dea2e6..9a2282b 100644 --- a/gcc/ada/libgnat/a-cbdlli.adb +++ b/gcc/ada/libgnat/a-cbdlli.adb @@ -304,7 +304,7 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1448,7 +1448,7 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is 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; @@ -1564,7 +1564,7 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cbhama.adb b/gcc/ada/libgnat/a-cbhama.adb index 74e3d95..d5cc820 100644 --- a/gcc/ada/libgnat/a-cbhama.adb +++ b/gcc/ada/libgnat/a-cbhama.adb @@ -213,7 +213,7 @@ package body Ada.Containers.Bounded_Hashed_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -239,7 +239,7 @@ package body Ada.Containers.Bounded_Hashed_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -853,7 +853,7 @@ package body Ada.Containers.Bounded_Hashed_Maps is 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; @@ -987,7 +987,7 @@ package body Ada.Containers.Bounded_Hashed_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -1012,7 +1012,7 @@ package body Ada.Containers.Bounded_Hashed_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cbhase.adb b/gcc/ada/libgnat/a-cbhase.adb index 390e82b..1fa2c21 100644 --- a/gcc/ada/libgnat/a-cbhase.adb +++ b/gcc/ada/libgnat/a-cbhase.adb @@ -231,7 +231,7 @@ package body Ada.Containers.Bounded_Hashed_Sets is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1077,7 +1077,7 @@ package body Ada.Containers.Bounded_Hashed_Sets is 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; @@ -1606,7 +1606,7 @@ package body Ada.Containers.Bounded_Hashed_Sets is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1787,7 +1787,7 @@ package body Ada.Containers.Bounded_Hashed_Sets is Old_Pos => Position, Old_Hash => Hash (Key (Position)))) do - Lock (Container.TC); + Busy (Container.TC); end return; end; end Reference_Preserving_Key; @@ -1816,7 +1816,7 @@ package body Ada.Containers.Bounded_Hashed_Sets is Old_Pos => P, Old_Hash => Hash (Key))) do - Lock (Container.TC); + Busy (Container.TC); end return; end; end Reference_Preserving_Key; diff --git a/gcc/ada/libgnat/a-cbmutr.adb b/gcc/ada/libgnat/a-cbmutr.adb index 4c0f8fe..ad9edaa 100644 --- a/gcc/ada/libgnat/a-cbmutr.adb +++ b/gcc/ada/libgnat/a-cbmutr.adb @@ -600,7 +600,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is (Element => Container.Elements (Position.Node)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2291,7 +2291,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is 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; @@ -2490,7 +2490,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is (Element => Container.Elements (Position.Node)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cborma.adb b/gcc/ada/libgnat/a-cborma.adb index e4e4b57..005bca5 100644 --- a/gcc/ada/libgnat/a-cborma.adb +++ b/gcc/ada/libgnat/a-cborma.adb @@ -420,7 +420,7 @@ package body Ada.Containers.Bounded_Ordered_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -445,7 +445,7 @@ package body Ada.Containers.Bounded_Ordered_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1256,7 +1256,7 @@ package body Ada.Containers.Bounded_Ordered_Maps is 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; @@ -1376,7 +1376,7 @@ package body Ada.Containers.Bounded_Ordered_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -1401,7 +1401,7 @@ package body Ada.Containers.Bounded_Ordered_Maps is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cborse.adb b/gcc/ada/libgnat/a-cborse.adb index 7b98378..b553048 100644 --- a/gcc/ada/libgnat/a-cborse.adb +++ b/gcc/ada/libgnat/a-cborse.adb @@ -420,7 +420,7 @@ package body Ada.Containers.Bounded_Ordered_Sets is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -741,7 +741,7 @@ package body Ada.Containers.Bounded_Ordered_Sets is (Element => N.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -937,7 +937,7 @@ package body Ada.Containers.Bounded_Ordered_Sets is Pos => Position, Old_Key => new Key_Type'(Key (Position)))) do - Lock (Container.TC); + Busy (Container.TC); end return; end; end Reference_Preserving_Key; @@ -965,7 +965,7 @@ package body Ada.Containers.Bounded_Ordered_Sets is Pos => Find (Container, Key), Old_Key => new Key_Type'(Key))) do - Lock (Container.TC); + Busy (Container.TC); end return; end; end Reference_Preserving_Key; @@ -1598,7 +1598,7 @@ package body Ada.Containers.Bounded_Ordered_Sets is 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; diff --git a/gcc/ada/libgnat/a-cdlili.adb b/gcc/ada/libgnat/a-cdlili.adb index 9122d57..949fb0f 100644 --- a/gcc/ada/libgnat/a-cdlili.adb +++ b/gcc/ada/libgnat/a-cdlili.adb @@ -255,7 +255,7 @@ package body Ada.Containers.Doubly_Linked_Lists is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1226,7 +1226,7 @@ package body Ada.Containers.Doubly_Linked_Lists is 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; @@ -1357,7 +1357,7 @@ package body Ada.Containers.Doubly_Linked_Lists is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cidlli.adb b/gcc/ada/libgnat/a-cidlli.adb index fd48045..65e4c10 100644 --- a/gcc/ada/libgnat/a-cidlli.adb +++ b/gcc/ada/libgnat/a-cidlli.adb @@ -280,7 +280,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is (Element => Position.Node.Element, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1263,7 +1263,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is 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; @@ -1405,7 +1405,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is (Element => Position.Node.Element, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cihama.adb b/gcc/ada/libgnat/a-cihama.adb index 0971a00..b33246d 100644 --- a/gcc/ada/libgnat/a-cihama.adb +++ b/gcc/ada/libgnat/a-cihama.adb @@ -220,7 +220,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -249,7 +249,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -911,7 +911,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is 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; @@ -1057,7 +1057,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -1086,7 +1086,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cihase.adb b/gcc/ada/libgnat/a-cihase.adb index ce158d2..bec48d0 100644 --- a/gcc/ada/libgnat/a-cihase.adb +++ b/gcc/ada/libgnat/a-cihase.adb @@ -239,7 +239,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1229,7 +1229,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is 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; @@ -2044,7 +2044,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2232,7 +2232,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is Old_Pos => Position, Old_Hash => Hash (Key (Position)))) do - Lock (HT.TC); + Busy (HT.TC); end return; end; end Reference_Preserving_Key; @@ -2266,7 +2266,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is Old_Pos => P, Old_Hash => Hash (Key))) do - Lock (HT.TC); + Busy (HT.TC); end return; end; end Reference_Preserving_Key; diff --git a/gcc/ada/libgnat/a-cimutr.adb b/gcc/ada/libgnat/a-cimutr.adb index 18bfff0..c5cf221 100644 --- a/gcc/ada/libgnat/a-cimutr.adb +++ b/gcc/ada/libgnat/a-cimutr.adb @@ -488,7 +488,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1847,7 +1847,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is 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; @@ -2044,7 +2044,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-ciorma.adb b/gcc/ada/libgnat/a-ciorma.adb index 5cc3590..818a2ae 100644 --- a/gcc/ada/libgnat/a-ciorma.adb +++ b/gcc/ada/libgnat/a-ciorma.adb @@ -374,7 +374,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -402,7 +402,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1250,7 +1250,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is 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; @@ -1387,7 +1387,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -1415,7 +1415,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-ciorse.adb b/gcc/ada/libgnat/a-ciorse.adb index d979e88..7cc7dca 100644 --- a/gcc/ada/libgnat/a-ciorse.adb +++ b/gcc/ada/libgnat/a-ciorse.adb @@ -394,7 +394,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -788,7 +788,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is (Element => Node.Element.all'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1017,7 +1017,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is Pos => Position, Old_Key => new Key_Type'(Key (Position)))) do - Lock (Tree.TC); + Busy (Tree.TC); end return; end; end Reference_Preserving_Key; @@ -1049,7 +1049,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is Pos => Find (Container, Key), Old_Key => new Key_Type'(Key))) do - Lock (Tree.TC); + Busy (Tree.TC); end return; end; end Reference_Preserving_Key; @@ -1688,7 +1688,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is 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; diff --git a/gcc/ada/libgnat/a-cobove.adb b/gcc/ada/libgnat/a-cobove.adb index 3e48bc6..7508794 100644 --- a/gcc/ada/libgnat/a-cobove.adb +++ b/gcc/ada/libgnat/a-cobove.adb @@ -402,7 +402,7 @@ package body Ada.Containers.Bounded_Vectors is (Element => A (J)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -426,7 +426,7 @@ package body Ada.Containers.Bounded_Vectors is (Element => A (J)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2067,7 +2067,7 @@ package body Ada.Containers.Bounded_Vectors is 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; @@ -2183,7 +2183,7 @@ package body Ada.Containers.Bounded_Vectors is (Element => A (J)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -2207,7 +2207,7 @@ package body Ada.Containers.Bounded_Vectors is (Element => A (J)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cohama.adb b/gcc/ada/libgnat/a-cohama.adb index 0eb6e7e..e7da020 100644 --- a/gcc/ada/libgnat/a-cohama.adb +++ b/gcc/ada/libgnat/a-cohama.adb @@ -213,7 +213,7 @@ package body Ada.Containers.Hashed_Maps is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -238,7 +238,7 @@ package body Ada.Containers.Hashed_Maps is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -836,7 +836,7 @@ package body Ada.Containers.Hashed_Maps is 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; @@ -937,7 +937,7 @@ package body Ada.Containers.Hashed_Maps is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -962,7 +962,7 @@ package body Ada.Containers.Hashed_Maps is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb index 37e55b8..61ebf87 100644 --- a/gcc/ada/libgnat/a-cohase.adb +++ b/gcc/ada/libgnat/a-cohase.adb @@ -223,7 +223,7 @@ package body Ada.Containers.Hashed_Sets is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1119,7 +1119,7 @@ package body Ada.Containers.Hashed_Sets is 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; @@ -1839,7 +1839,7 @@ package body Ada.Containers.Hashed_Sets is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2025,7 +2025,7 @@ package body Ada.Containers.Hashed_Sets is Old_Pos => Position, Old_Hash => Hash (Key (Position)))) do - Lock (HT.TC); + Busy (HT.TC); end return; end; end Reference_Preserving_Key; @@ -2055,7 +2055,7 @@ package body Ada.Containers.Hashed_Sets is Old_Pos => P, Old_Hash => Hash (Key))) do - Lock (HT.TC); + Busy (HT.TC); end return; end; end Reference_Preserving_Key; diff --git a/gcc/ada/libgnat/a-coinve.adb b/gcc/ada/libgnat/a-coinve.adb index 22608c1..0dfe1c6 100644 --- a/gcc/ada/libgnat/a-coinve.adb +++ b/gcc/ada/libgnat/a-coinve.adb @@ -324,7 +324,7 @@ package body Ada.Containers.Indefinite_Vectors is (Element => Container.Elements.EA (Position.Index), Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -348,7 +348,7 @@ package body Ada.Containers.Indefinite_Vectors is (Element => Container.Elements.EA (Index), Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2586,7 +2586,7 @@ package body Ada.Containers.Indefinite_Vectors is 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; @@ -2718,7 +2718,7 @@ package body Ada.Containers.Indefinite_Vectors is (Element => Container.Elements.EA (Position.Index), Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -2742,7 +2742,7 @@ package body Ada.Containers.Indefinite_Vectors is (Element => Container.Elements.EA (Index), Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-comutr.adb b/gcc/ada/libgnat/a-comutr.adb index 59ed12b..9e6a00e 100644 --- a/gcc/ada/libgnat/a-comutr.adb +++ b/gcc/ada/libgnat/a-comutr.adb @@ -469,7 +469,7 @@ package body Ada.Containers.Multiway_Trees is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1830,7 +1830,7 @@ package body Ada.Containers.Multiway_Trees is 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; @@ -2023,7 +2023,7 @@ package body Ada.Containers.Multiway_Trees is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-conhel.adb b/gcc/ada/libgnat/a-conhel.adb index 2908530..06af0da 100644 --- a/gcc/ada/libgnat/a-conhel.adb +++ b/gcc/ada/libgnat/a-conhel.adb @@ -38,7 +38,7 @@ package body Ada.Containers.Helpers is 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; @@ -60,7 +60,7 @@ package body Ada.Containers.Helpers is 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; diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb index e15ab5d..f5e2eb4 100644 --- a/gcc/ada/libgnat/a-convec.adb +++ b/gcc/ada/libgnat/a-convec.adb @@ -294,7 +294,7 @@ package body Ada.Containers.Vectors is (Element => Container.Elements.EA (Position.Index)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -316,7 +316,7 @@ package body Ada.Containers.Vectors is (Element => Container.Elements.EA (Index)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -2293,7 +2293,7 @@ package body Ada.Containers.Vectors is 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; @@ -2409,7 +2409,7 @@ package body Ada.Containers.Vectors is (Element => Container.Elements.EA (Position.Index)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -2431,7 +2431,7 @@ package body Ada.Containers.Vectors is (Element => Container.Elements.EA (Index)'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-coorma.adb b/gcc/ada/libgnat/a-coorma.adb index 8275802..e49ae90 100644 --- a/gcc/ada/libgnat/a-coorma.adb +++ b/gcc/ada/libgnat/a-coorma.adb @@ -336,7 +336,7 @@ package body Ada.Containers.Ordered_Maps is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -361,7 +361,7 @@ package body Ada.Containers.Ordered_Maps is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -1180,7 +1180,7 @@ package body Ada.Containers.Ordered_Maps is 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; @@ -1307,7 +1307,7 @@ package body Ada.Containers.Ordered_Maps is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; @@ -1332,7 +1332,7 @@ package body Ada.Containers.Ordered_Maps is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Reference; diff --git a/gcc/ada/libgnat/a-coorse.adb b/gcc/ada/libgnat/a-coorse.adb index 462f7f3..d2f8a58 100644 --- a/gcc/ada/libgnat/a-coorse.adb +++ b/gcc/ada/libgnat/a-coorse.adb @@ -349,7 +349,7 @@ package body Ada.Containers.Ordered_Sets is (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -706,7 +706,7 @@ package body Ada.Containers.Ordered_Sets is (Element => Node.Element'Access, Control => (Controlled with TC)) do - Lock (TC.all); + Busy (TC.all); end return; end; end Constant_Reference; @@ -903,7 +903,7 @@ package body Ada.Containers.Ordered_Sets is Pos => Position, Old_Key => new Key_Type'(Key (Position)))) do - Lock (Tree.TC); + Busy (Tree.TC); end return; end; end Reference_Preserving_Key; @@ -931,7 +931,7 @@ package body Ada.Containers.Ordered_Sets is Pos => Find (Container, Key), Old_Key => new Key_Type'(Key))) do - Lock (Tree.TC); + Busy (Tree.TC); end return; end; end Reference_Preserving_Key; @@ -1550,7 +1550,7 @@ package body Ada.Containers.Ordered_Sets is 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; -- 2.7.4