From 0afa439d45662de1edfaabbe6d1b418804dc230e Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 3 Oct 1999 12:55:58 +0000 Subject: [PATCH] Fix style bugs caused by using the wrong file to copy from. That one gets fixed later on. Reinstate the mysterious 4th argument to signal handlers and add some comments on that. --- sys/amd64/include/sigframe.h | 16 ++++++++++++---- sys/i386/include/sigframe.h | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/sys/amd64/include/sigframe.h b/sys/amd64/include/sigframe.h index 9c47915902c..ac64ddb0013 100644 --- a/sys/amd64/include/sigframe.h +++ b/sys/amd64/include/sigframe.h @@ -29,7 +29,11 @@ */ #ifndef _MACHINE_SIGFRAME_H_ -#define _MACHINE_SIGFRAME_H_ 1 +#define _MACHINE_SIGFRAME_H_ + +/* + * Signal frames, arguments passed to application signal handlers. + */ struct osigframe { /* @@ -68,12 +72,16 @@ struct osigframe { struct sigframe { /* - * The first three members may be used by applications. + * The first four members may be used by applications. + * NOTE: The 4th argument is undocumented, ill commented + * on and seems to be somewhat BSD "standard". + * Handlers installed with sigvec may be using it. */ register_t sf_signum; register_t sf_siginfo; /* code or pointer to sf_si */ register_t sf_ucontext; /* points to sf_uc */ - register_t __spare__; /* Align sf_ahu */ + char *sf_addr; /* undocumented 4th arg */ + union { __siginfohandler_t *sf_action; __sighandler_t *sf_handler; @@ -83,4 +91,4 @@ struct sigframe { ucontext_t sf_uc; /* = *sf_ucontext */ }; -#endif /* _MACHINE_SIGFRAME_H_ */ +#endif /* !_MACHINE_SIGFRAME_H_ */ diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h index 9c47915902c..ac64ddb0013 100644 --- a/sys/i386/include/sigframe.h +++ b/sys/i386/include/sigframe.h @@ -29,7 +29,11 @@ */ #ifndef _MACHINE_SIGFRAME_H_ -#define _MACHINE_SIGFRAME_H_ 1 +#define _MACHINE_SIGFRAME_H_ + +/* + * Signal frames, arguments passed to application signal handlers. + */ struct osigframe { /* @@ -68,12 +72,16 @@ struct osigframe { struct sigframe { /* - * The first three members may be used by applications. + * The first four members may be used by applications. + * NOTE: The 4th argument is undocumented, ill commented + * on and seems to be somewhat BSD "standard". + * Handlers installed with sigvec may be using it. */ register_t sf_signum; register_t sf_siginfo; /* code or pointer to sf_si */ register_t sf_ucontext; /* points to sf_uc */ - register_t __spare__; /* Align sf_ahu */ + char *sf_addr; /* undocumented 4th arg */ + union { __siginfohandler_t *sf_action; __sighandler_t *sf_handler; @@ -83,4 +91,4 @@ struct sigframe { ucontext_t sf_uc; /* = *sf_ucontext */ }; -#endif /* _MACHINE_SIGFRAME_H_ */ +#endif /* !_MACHINE_SIGFRAME_H_ */