[Ada] Ensure System.Tasking.Debug.Known_Tasks component access is atomic

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 30 09:30:45 GMT 2021


Multiple threads can access the elements of
System.Tasking.Debug.Known_Tasks concurrently. While the compiler will
generally produce code that reads and writes Task_Ids atomically since
Task_Id is word size, it is best to be explicit to prevent data race
issues that may arise from non-atomic component accesses.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnarl/s-tasdeb.ads (Known_Tasks): Add Atomic_Components
	aspect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 740 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210630/81503099/attachment-0001.bin>


More information about the Gcc-patches mailing list