aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Bernardi <bernardi@adacore.com>2021-04-14 13:50:57 +1000
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-29 14:23:48 +0000
commit793543254a6e94055e701499b7e9c8c1d3830061 (patch)
treef42dd791d965c9bdc22af7910a49e8690b290e25
parentb75d2a509265580e72dff963a8bdff52bb6a1a21 (diff)
downloadgcc-793543254a6e94055e701499b7e9c8c1d3830061.zip
gcc-793543254a6e94055e701499b7e9c8c1d3830061.tar.gz
gcc-793543254a6e94055e701499b7e9c8c1d3830061.tar.bz2
[Ada] Ensure System.Tasking.Debug.Known_Tasks component access is atomic
gcc/ada/ * libgnarl/s-tasdeb.ads (Known_Tasks): Add Atomic_Components aspect.
-rw-r--r--gcc/ada/libgnarl/s-tasdeb.ads6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/libgnarl/s-tasdeb.ads b/gcc/ada/libgnarl/s-tasdeb.ads
index 3e8a8d8..eebb2a9 100644
--- a/gcc/ada/libgnarl/s-tasdeb.ads
+++ b/gcc/ada/libgnarl/s-tasdeb.ads
@@ -65,9 +65,11 @@ package System.Tasking.Debug is
-- General GDB support --
-------------------------
- Known_Tasks : array (0 .. 999) of Task_Id := (others => null);
+ Known_Tasks : array (0 .. 999) of Task_Id := (others => null)
+ with Atomic_Components;
-- Global array of tasks read by gdb, and updated by Create_Task and
- -- Finalize_TCB
+ -- Finalize_TCB. Ensure access to its components is atomic to allow
+ -- lock-free concurrent access.
Debug_Event_Activating : constant := 1;
Debug_Event_Run : constant := 2;