summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/sigframe.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-10-25 19:10:58 +0000
committerpeter <peter@FreeBSD.org>2002-10-25 19:10:58 +0000
commitf7fa86b743f4851065b80a704e7ee6c9922b5bda (patch)
tree96a1089f558875f808b1fd36f885179cd78f55de /sys/amd64/include/sigframe.h
parentc689b5c88a817d10910bb530d1a68187b58db634 (diff)
downloadFreeBSD-src-f7fa86b743f4851065b80a704e7ee6c9922b5bda.zip
FreeBSD-src-f7fa86b743f4851065b80a704e7ee6c9922b5bda.tar.gz
Split 4.x and 5.x signal handling so that we can keep 4.x signal
handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
Diffstat (limited to 'sys/amd64/include/sigframe.h')
-rw-r--r--sys/amd64/include/sigframe.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/amd64/include/sigframe.h b/sys/amd64/include/sigframe.h
index 947743d..98be731 100644
--- a/sys/amd64/include/sigframe.h
+++ b/sys/amd64/include/sigframe.h
@@ -35,6 +35,7 @@
* Signal frames, arguments passed to application signal handlers.
*/
#ifdef _KERNEL
+#ifdef COMPAT_43
struct osigframe {
/*
* The first four members may be used by applications.
@@ -70,6 +71,23 @@ struct osigframe {
osiginfo_t sf_siginfo;
};
#endif
+#ifdef COMPAT_FREEBSD4
+/* FreeBSD 4.x */
+struct sigframe4 {
+ register_t sf_signum;
+ register_t sf_siginfo; /* code or pointer to sf_si */
+ register_t sf_ucontext; /* points to sf_uc */
+ register_t sf_addr; /* undocumented 4th arg */
+
+ union {
+ __siginfohandler_t *sf_action;
+ __sighandler_t *sf_handler;
+ } sf_ahu;
+ struct ucontext4 sf_uc; /* = *sf_ucontext */
+ siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case) */
+};
+#endif
+#endif
struct sigframe {
/*
OpenPOWER on IntegriCloud