diff options
author | Doug Rupp <rupp@adacore.com> | 2021-07-07 09:38:34 -0700 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-21 15:25:04 +0000 |
commit | 303b5d874720aa1830c696a20e1e03abc1a12e14 (patch) | |
tree | e6c6e7f12e5b7af13bf353d2df5dd6084fd99184 /gcc/ada/init.c | |
parent | e839168738cb28cd768492b0b998c2c606cd7526 (diff) | |
download | gcc-303b5d874720aa1830c696a20e1e03abc1a12e14.zip gcc-303b5d874720aa1830c696a20e1e03abc1a12e14.tar.gz gcc-303b5d874720aa1830c696a20e1e03abc1a12e14.tar.bz2 |
[Ada] Add some comments in init.c about the lynx178 signal handler
gcc/ada/
* init.c (__gnat_error_handler) [LynxOS]: Add a comment about
missing optional args.
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index c48e244..2bbb601 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -661,6 +661,28 @@ __gnat_install_handler (void) #include <signal.h> #include <unistd.h> +/* SA_SIGINFO is not supported by default on LynxOS, so all we have + available here is the "sig" argument. On newer LynxOS versions it's + possible to support SA_SIGINFO by setting a kernel configuration macro. + + To wit: + + #define NONPOSIX_SA_HANDLER_PROTO (0) + + This macro must be set to 1 in either sys/bsp.<bspname>/uparam.h + or in the associated uparam.h customization file sys/bsp.<bspname>/xparam.h + (uparam.h includes xparam.h for customization) + + The NONPOSIX_SA_HANDLER_PROTO macro makes it possible to provide + signal-catching function with 'info' and 'context' input parameters + even if SA_SIGINFO flag is not set or it is set for a non-realtime signal. + + It also allows signal-catching function to update thread context even + if SA_UPDATECTX flag is not set. + + This would be useful, but relying on that would transmit the requirement + to users to configure that feature as well, which is undesirable. */ + static void __gnat_error_handler (int sig) { |