From 793543254a6e94055e701499b7e9c8c1d3830061 Mon Sep 17 00:00:00 2001 From: Patrick Bernardi Date: Wed, 14 Apr 2021 13:50:57 +1000 Subject: [PATCH] [Ada] Ensure System.Tasking.Debug.Known_Tasks component access is atomic gcc/ada/ * libgnarl/s-tasdeb.ads (Known_Tasks): Add Atomic_Components aspect. --- gcc/ada/libgnarl/s-tasdeb.ads | 6 ++++-- 1 file 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; -- 2.7.4