From: Patrick Bernardi Date: Wed, 14 Apr 2021 03:50:57 +0000 (+1000) Subject: [Ada] Ensure System.Tasking.Debug.Known_Tasks component access is atomic X-Git-Tag: basepoints/gcc-13~6420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=793543254a6e94055e701499b7e9c8c1d3830061;p=thirdparty%2Fgcc.git [Ada] Ensure System.Tasking.Debug.Known_Tasks component access is atomic gcc/ada/ * libgnarl/s-tasdeb.ads (Known_Tasks): Add Atomic_Components aspect. --- diff --git a/gcc/ada/libgnarl/s-tasdeb.ads b/gcc/ada/libgnarl/s-tasdeb.ads index 3e8a8d8cbf9c..eebb2a9f319c 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;