]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix address manipulation issue in the tasking runtime
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 24 Feb 2023 16:08:01 +0000 (17:08 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 23 May 2023 07:59:07 +0000 (09:59 +0200)
commite15ce6502c7b607f2ca0ee178a715d6fc13ac6b6
tree7dc57090942cb4a1a62051908d247b384af8245b
parent1dd52433d2d1c122c7338ddb350f8691f084e0cf
ada: Fix address manipulation issue in the tasking runtime

The implementation of task attributes in the runtime defines an atomic clone
of System.Address, which is awkward for targets where addresses and pointers
have a specific representation, so this change replaces that with a pragma
Atomic_Components on the Attribute_Array type.

gcc/ada/

* libgnarl/s-taskin.ads (Atomic_Address): Delete.
(Attribute_Array): Add pragma Atomic_Components.
(Ada_Task_Control_Block): Adjust default value of Attributes.
* libgnarl/s-tasini.adb (Finalize_Attributes): Adjust type of local
variable.
* libgnarl/s-tataat.ads (Deallocator): Adjust type of parameter.
(To_Attribute): Adjust source type.
* libgnarl/a-tasatt.adb: Add clauses for System.Storage_Elements.
(New_Attribute): Adjust return type.
(Deallocate): Adjust type of parameter.
(To_Real_Attribute): Adjust source type.
(To_Address): Add target type.
(To_Attribute): Adjust source type.
(Fast_Path): Adjust tested type.
(Finalize): Compare with Null_Address.
(Reference): Likewise.
(Reinitialize): Likewise.
(Set_Value): Likewise.  Add conversion to Integer_Address.
(Value): Likewise.
gcc/ada/libgnarl/a-tasatt.adb
gcc/ada/libgnarl/s-tasini.adb
gcc/ada/libgnarl/s-taskin.ads
gcc/ada/libgnarl/s-tataat.ads