Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnat/a-coinve.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 . I N D E F I N I T E _ V E C T O R S -- | 5 -- A D A . C O N T A I N E R S . I N D E F I N I T E _ V E C T O R 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- -- |
322 | 322 |
323 return R : constant Constant_Reference_Type := | 323 return R : constant Constant_Reference_Type := |
324 (Element => Container.Elements.EA (Position.Index), | 324 (Element => Container.Elements.EA (Position.Index), |
325 Control => (Controlled with TC)) | 325 Control => (Controlled with TC)) |
326 do | 326 do |
327 Lock (TC.all); | 327 Busy (TC.all); |
328 end return; | 328 end return; |
329 end; | 329 end; |
330 end Constant_Reference; | 330 end Constant_Reference; |
331 | 331 |
332 function Constant_Reference | 332 function Constant_Reference |
346 | 346 |
347 return R : constant Constant_Reference_Type := | 347 return R : constant Constant_Reference_Type := |
348 (Element => Container.Elements.EA (Index), | 348 (Element => Container.Elements.EA (Index), |
349 Control => (Controlled with TC)) | 349 Control => (Controlled with TC)) |
350 do | 350 do |
351 Lock (TC.all); | 351 Busy (TC.all); |
352 end return; | 352 end return; |
353 end; | 353 end; |
354 end Constant_Reference; | 354 end Constant_Reference; |
355 | 355 |
356 -------------- | 356 -------------- |
2584 (Container : aliased Vector'Class) return Reference_Control_Type | 2584 (Container : aliased Vector'Class) return Reference_Control_Type |
2585 is | 2585 is |
2586 TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; | 2586 TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; |
2587 begin | 2587 begin |
2588 return R : constant Reference_Control_Type := (Controlled with TC) do | 2588 return R : constant Reference_Control_Type := (Controlled with TC) do |
2589 Lock (TC.all); | 2589 Busy (TC.all); |
2590 end return; | 2590 end return; |
2591 end Pseudo_Reference; | 2591 end Pseudo_Reference; |
2592 | 2592 |
2593 ------------------- | 2593 ------------------- |
2594 -- Query_Element -- | 2594 -- Query_Element -- |
2716 | 2716 |
2717 return R : constant Reference_Type := | 2717 return R : constant Reference_Type := |
2718 (Element => Container.Elements.EA (Position.Index), | 2718 (Element => Container.Elements.EA (Position.Index), |
2719 Control => (Controlled with TC)) | 2719 Control => (Controlled with TC)) |
2720 do | 2720 do |
2721 Lock (TC.all); | 2721 Busy (TC.all); |
2722 end return; | 2722 end return; |
2723 end; | 2723 end; |
2724 end Reference; | 2724 end Reference; |
2725 | 2725 |
2726 function Reference | 2726 function Reference |
2740 | 2740 |
2741 return R : constant Reference_Type := | 2741 return R : constant Reference_Type := |
2742 (Element => Container.Elements.EA (Index), | 2742 (Element => Container.Elements.EA (Index), |
2743 Control => (Controlled with TC)) | 2743 Control => (Controlled with TC)) |
2744 do | 2744 do |
2745 Lock (TC.all); | 2745 Busy (TC.all); |
2746 end return; | 2746 end return; |
2747 end; | 2747 end; |
2748 end Reference; | 2748 end Reference; |
2749 | 2749 |
2750 --------------------- | 2750 --------------------- |