aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/rtsfind.ads
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2021-05-24 14:38:07 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-08 13:34:18 +0000
commit5478d8a7aefbec4d93d32237fb29b9fdb8347b6b (patch)
treebcb2b5e4c70a293b89ab1518d970c3c9f4fd3e01 /gcc/ada/rtsfind.ads
parent076c1a91574d5abcd32898ec1a1a5975254c32a3 (diff)
downloadgcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.zip
gcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.tar.gz
gcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.tar.bz2
[Ada] Unsynchronized concurrent access to a Boolean variable
gcc/ada/ * rtsfind.ads, rtsfind.adb: Add support for finding the packages System.Atomic_Operations and System.Atomic_Operations.Test_And_Set and the declarations within that latter package of the type Test_And_Set_Flag and the function Atomic_Test_And_Set. * exp_ch11.adb (Expand_N_Exception_Declaration): If an exception is declared other than at library level, then we need to call Register_Exception the first time (and only the first time) the declaration is elaborated. In order to decide whether to perform this call for a given elaboration of the declaration, we used to unconditionally use a (library-level) Boolean variable. Now we instead use a variable of type System.Atomic_Operations.Test_And_Set.Test_And_Set_Flag unless either that type is unavailable or a No_Tasking restriction is in effect (in which case we use a Boolean variable as before).
Diffstat (limited to 'gcc/ada/rtsfind.ads')
-rw-r--r--gcc/ada/rtsfind.ads11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index 6bec611..99f870a 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -195,6 +195,7 @@ package Rtsfind is
System_Arith_128,
System_AST_Handling,
System_Assertions,
+ System_Atomic_Operations,
System_Atomic_Primitives,
System_Aux_DEC,
System_Bignums,
@@ -468,6 +469,10 @@ package Rtsfind is
System_WWd_Enum,
System_WWd_Wchar,
+ -- Children of System.Atomic_Operations
+
+ System_Atomic_Operations_Test_And_Set,
+
-- Children of System.Dim
System_Dim_Float_IO,
@@ -800,6 +805,9 @@ package Rtsfind is
RE_Uint32, -- System.Atomic_Primitives
RE_Uint64, -- System.Atomic_Primitives
+ RE_Test_And_Set_Flag, -- System.Atomic_Operations.Test_And_Set
+ RE_Atomic_Test_And_Set, -- System.Atomic_Operations.Test_And_Set
+
RE_AST_Handler, -- System.Aux_DEC
RE_Import_Address, -- System.Aux_DEC
RE_Import_Value, -- System.Aux_DEC
@@ -2482,6 +2490,9 @@ package Rtsfind is
RE_Uint32 => System_Atomic_Primitives,
RE_Uint64 => System_Atomic_Primitives,
+ RE_Test_And_Set_Flag => System_Atomic_Operations_Test_And_Set,
+ RE_Atomic_Test_And_Set => System_Atomic_Operations_Test_And_Set,
+
RE_AST_Handler => System_Aux_DEC,
RE_Import_Address => System_Aux_DEC,
RE_Import_Value => System_Aux_DEC,