]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Sync different variants of interrupt handler registration
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 9 Sep 2022 15:49:39 +0000 (17:49 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 23 May 2023 07:58:57 +0000 (09:58 +0200)
commitdb338ee106ab912c2a318b74fe7534071a0e6729
tree514aa7e92387344983d5689fa939fa89b3771672
parent35a035c210e57ea2172078ff59b76bb75baf3b6d
ada: Sync different variants of interrupt handler registration

This patch propagates the apparently cleanest solutions between various
variants of the runtime units for interrupt handler registration.

In particular, the unnecessary default expressions for list cells with
interrupt handler addresses are removed, the list is changed from
doubly-linked to singly-linked, and assertion preventing registration of
null addresses now appears in all runtimes.

Effectively, it is just a code cleanup and minor optimization; behavior
of the runtime unit is unaffected.

gcc/ada/

* libgnarl/s-interr.adb
(Registered_Handler): Remove default expression.
(Registered_Handlers): Switch to singly-linked list.
(Bind_Interrupt_To_Entry): Sync whitespace with other unit variants.
(Is_Registered): Use singly-linked list.
(Register_Interrupt_Handler): Use singly-linked list and initialized
allocator; sync assertion with other unit variants.
* libgnarl/s-interr__sigaction.adb: Likewise.
* libgnarl/s-interr__vxworks.adb: Likewise.
* libgnarl/s-interr__hwint.adb: Likewise.
(Is_Registered): Remove repeated declaration.
gcc/ada/libgnarl/s-interr.adb
gcc/ada/libgnarl/s-interr__hwint.adb
gcc/ada/libgnarl/s-interr__sigaction.adb
gcc/ada/libgnarl/s-interr__vxworks.adb