[Ada] Replace in Ordered_Maps gets tampering failure
authorBob Duff <duff@adacore.com>
Thu, 10 Oct 2019 15:23:08 +0000 (15:23 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 10 Oct 2019 15:23:08 +0000 (15:23 +0000)
2019-10-10  Bob Duff  <duff@adacore.com>

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

23 files changed:
gcc/ada/ChangeLog
gcc/ada/libgnat/a-cbdlli.adb
gcc/ada/libgnat/a-cbhama.adb
gcc/ada/libgnat/a-cbhase.adb
gcc/ada/libgnat/a-cbmutr.adb
gcc/ada/libgnat/a-cborma.adb
gcc/ada/libgnat/a-cborse.adb
gcc/ada/libgnat/a-cdlili.adb
gcc/ada/libgnat/a-cidlli.adb
gcc/ada/libgnat/a-cihama.adb
gcc/ada/libgnat/a-cihase.adb
gcc/ada/libgnat/a-cimutr.adb
gcc/ada/libgnat/a-ciorma.adb
gcc/ada/libgnat/a-ciorse.adb
gcc/ada/libgnat/a-cobove.adb
gcc/ada/libgnat/a-cohama.adb
gcc/ada/libgnat/a-cohase.adb
gcc/ada/libgnat/a-coinve.adb
gcc/ada/libgnat/a-comutr.adb
gcc/ada/libgnat/a-conhel.adb
gcc/ada/libgnat/a-convec.adb
gcc/ada/libgnat/a-coorma.adb
gcc/ada/libgnat/a-coorse.adb

index 50654f0..745c7b5 100644 (file)
@@ -1,6 +1,15 @@
-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
index 4dea2e6..9a2282b 100644 (file)
@@ -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;
index 74e3d95..d5cc820 100644 (file)
@@ -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;
index 390e82b..1fa2c21 100644 (file)
@@ -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;
index 4c0f8fe..ad9edaa 100644 (file)
@@ -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;
index e4e4b57..005bca5 100644 (file)
@@ -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;
index 7b98378..b553048 100644 (file)
@@ -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;
 
index 9122d57..949fb0f 100644 (file)
@@ -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;
index fd48045..65e4c10 100644 (file)
@@ -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;
index 0971a00..b33246d 100644 (file)
@@ -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;
index ce158d2..bec48d0 100644 (file)
@@ -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;
index 18bfff0..c5cf221 100644 (file)
@@ -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;
index 5cc3590..818a2ae 100644 (file)
@@ -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;
index d979e88..7cc7dca 100644 (file)
@@ -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;
 
index 3e48bc6..7508794 100644 (file)
@@ -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;
index 0eb6e7e..e7da020 100644 (file)
@@ -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;
index 37e55b8..61ebf87 100644 (file)
@@ -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;
index 22608c1..0dfe1c6 100644 (file)
@@ -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;
index 59ed12b..9e6a00e 100644 (file)
@@ -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;
index 2908530..06af0da 100644 (file)
@@ -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;
index e15ab5d..f5e2eb4 100644 (file)
@@ -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;
index 8275802..e49ae90 100644 (file)
@@ -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;
index 462f7f3..d2f8a58 100644 (file)
@@ -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;