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 50654f06046..745c7b57b16 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 4dea2e64d2f..9a2282b2d85 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 74e3d95748a..d5cc8206222 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 390e82bb485..1fa2c21c00d 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 4c0f8fe1c29..ad9edaaa142 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 e4e4b57dc72..005bca5d0c2 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 7b983781e60..b55304810b9 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 9122d574d4f..949fb0f5dac 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 fd480457395..65e4c10fcee 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 0971a006ea9..b33246d3546 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 ce158d2ab42..bec48d06e6f 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 18bfff07308..c5cf2212096 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 5cc35908e8f..818a2ae0f60 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 d979e88db2e..7cc7dca87cd 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 3e48bc60e8a..75087949af8 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 0eb6e7ea315..e7da0204af8 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 37e55b80229..61ebf87d2f1 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 22608c17c65..0dfe1c63e89 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 59ed12b8f56..9e6a00e8e3b 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 29085300f39..06af0dabf7e 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 e15ab5d06a8..f5e2eb42287 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 8275802ccd9..e49ae902476 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 462f7f30e6a..d2f8a58f910 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.30.2