comparison gcc/ada/libgnat/a-cdlili.adb @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
4 -- -- 4 -- --
5 -- A D A . C O N T A I N E R S . D O U B L Y _ L I N K E D _ L I S T S -- 5 -- A D A . C O N T A I N E R S . D O U B L Y _ L I N K E D _ L I S T S --
6 -- -- 6 -- --
7 -- B o d y -- 7 -- B o d y --
8 -- -- 8 -- --
9 -- Copyright (C) 2004-2018, Free Software Foundation, Inc. -- 9 -- Copyright (C) 2004-2019, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
253 begin 253 begin
254 return R : constant Constant_Reference_Type := 254 return R : constant Constant_Reference_Type :=
255 (Element => Position.Node.Element'Access, 255 (Element => Position.Node.Element'Access,
256 Control => (Controlled with TC)) 256 Control => (Controlled with TC))
257 do 257 do
258 Lock (TC.all); 258 Busy (TC.all);
259 end return; 259 end return;
260 end; 260 end;
261 end Constant_Reference; 261 end Constant_Reference;
262 262
263 -------------- 263 --------------
1224 (Container : aliased List'Class) return Reference_Control_Type 1224 (Container : aliased List'Class) return Reference_Control_Type
1225 is 1225 is
1226 TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; 1226 TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
1227 begin 1227 begin
1228 return R : constant Reference_Control_Type := (Controlled with TC) do 1228 return R : constant Reference_Control_Type := (Controlled with TC) do
1229 Lock (TC.all); 1229 Busy (TC.all);
1230 end return; 1230 end return;
1231 end Pseudo_Reference; 1231 end Pseudo_Reference;
1232 1232
1233 ------------------- 1233 -------------------
1234 -- Query_Element -- 1234 -- Query_Element --
1355 begin 1355 begin
1356 return R : constant Reference_Type := 1356 return R : constant Reference_Type :=
1357 (Element => Position.Node.Element'Access, 1357 (Element => Position.Node.Element'Access,
1358 Control => (Controlled with TC)) 1358 Control => (Controlled with TC))
1359 do 1359 do
1360 Lock (TC.all); 1360 Busy (TC.all);
1361 end return; 1361 end return;
1362 end; 1362 end;
1363 end Reference; 1363 end Reference;
1364 1364
1365 --------------------- 1365 ---------------------