diff options
author | Doug Rupp <rupp@adacore.com> | 2024-02-03 04:18:51 -0800 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-20 10:50:56 +0200 |
commit | 980fddd8d90c97d44074021c6121a8d134e6c88c (patch) | |
tree | fd29c4707f79cc1267d0210bb5f060a9656b9ea2 /gcc/ada/ali.adb | |
parent | 3a16f19777f882f98b6d901a81157779e898f636 (diff) | |
download | gcc-980fddd8d90c97d44074021c6121a8d134e6c88c.zip gcc-980fddd8d90c97d44074021c6121a8d134e6c88c.tar.gz gcc-980fddd8d90c97d44074021c6121a8d134e6c88c.tar.bz2 |
ada: New pragma to default all interrupts to system.
New pragma Interrupts_System_By_Default defaults all interrupts/signals
to system (which will inhibit the installation of default signal handlers).
Note this changes the ALI format: it optionally adds an identifier to
the 'P' line (similar to pragma Unreserve_All_Interrupts). As per comment
in lib-writ spec regarding new modifiers, adding modifiers to the P line
is always safe. Also note this does not introduce a bootstrap problem
because the compiler and binder do not set the underlying _gl global nor
do they use this pragma.
gcc/ada/
* ali.ads (Interrupts_Default_To_System): New boolean.
(Interrupts_Default_To_System_Specified): New boolean.
* ali.adb (Interrupts_Default_To_System_Specified): Initialize.
(Interrupts_Default_To_System): Initialize.
(Scan_ALI): Processing for "ID".
* bindgen.adb: Coallesce comments on interrupt settings to ...
(Gen_Adainit): Import Interrupts_Default_To_System flag and set if
pragma specified.
(Gen_Output_File_Ada): Generate Local_Interrupt_States according
to pragma.
* init.c: ... here.
[vxworks] (__gnat_install_handler): Test for interrupt_state.
(__gl_interrupts_default_to_system): New global flag.
(__gnat_get_interrupt_State): return interrupt state according to
new global flag.
* lib-writ.ads: Document "ID".
* lib-writ.adb: Write out "ID".
* opt.ads (Interrupts_System_By_Default): New boolean, defaulted
to False.
* par-prag.adb (Pragma_Interrupts_System_By_Default): New.
* sem_prag.adb (Pragma_Interrupts_System_By_Default): Handle it.
(Pragma_Interrupts_System_By_Default): Default it.
* snames.ads-tmpl (Name_Interrupts_System_By_Default): New name.
(Pragma_Interrupts_System_By_Default): New
* libgnarl/s-intman__posix.adb (Initialize): Ensure the
Keep_Unmasked signal is sigset-able.
* doc/gnat_rm/implementation_defined_pragmas.rst: Document pragma
Interrupts_System_By_Default.
* doc/gnat_ugn/the_gnat_compilation_model.rst (Configuration
pragmas): Add Interrupts_System_By_Default. (Partition-Wide
Settings): Mention pragma Interrupts_System_By_Default.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/ali.adb')
-rw-r--r-- | gcc/ada/ali.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index 7c7f790..bde73b9 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -665,6 +665,7 @@ package body ALI is No_Object_Specified := False; No_Component_Reordering_Specified := False; GNATprove_Mode_Specified := False; + Interrupts_Default_To_System_Specified := False; Normalize_Scalars_Specified := False; Partition_Elaboration_Policy_Specified := ' '; Queuing_Policy_Specified := ' '; @@ -1750,6 +1751,7 @@ package body ALI is First_Specific_Dispatching => Specific_Dispatching.Last + 1, First_Unit => No_Unit_Id, GNATprove_Mode => False, + Interrupts_Default_To_System => False, Invocation_Graph_Encoding => No_Encoding, Last_CUDA_Kernel => CUDA_Kernels.Last, Last_Interrupt_State => Interrupt_States.Last, @@ -2005,6 +2007,13 @@ package body ALI is GNATprove_Mode_Specified := True; ALIs.Table (Id).GNATprove_Mode := True; + -- Processing for ID (Interrupts Default to System) + + elsif C = 'I' then + Checkc ('D'); + Interrupts_Default_To_System_Specified := True; + ALIs.Table (Id).Interrupts_Default_To_System := True; + -- Processing for Lx elsif C = 'L' then |