summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
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/sparc64
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/sparc64')
-rw-r--r--sys/sparc64/include/signal.h8
-rw-r--r--sys/sparc64/sparc64/machdep.c24
2 files changed, 10 insertions, 22 deletions
diff --git a/sys/sparc64/include/signal.h b/sys/sparc64/include/signal.h
index c27ad57..2b834ad 100644
--- a/sys/sparc64/include/signal.h
+++ b/sys/sparc64/include/signal.h
@@ -46,14 +46,6 @@ typedef long sig_atomic_t;
#define MINSIGSTKSZ (1024 * 4)
#endif
-#ifdef _KERNEL
-typedef int osigset_t;
-
-struct osigcontext {
- int dummy;
-};
-#endif
-
#if __BSD_VISIBLE
struct sigcontext {
int _dummy;
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 55ef2a9..8203056 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -40,6 +40,7 @@
* $FreeBSD$
*/
+#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_msgbuf.h"
@@ -449,20 +450,6 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
PROC_LOCK(p);
}
-/*
- * Stub to satisfy the reference to osigreturn in the syscall table. This
- * is needed even for newer arches that don't support old signals because
- * the syscall table is machine-independent.
- *
- * MPSAFE
- */
-int
-osigreturn(struct thread *td, struct osigreturn_args *uap)
-{
-
- return (nosys(td, (struct nosys_args *)uap));
-}
-
#ifndef _SYS_SYSPROTO_H_
struct sigreturn_args {
ucontext_t *ucp;
@@ -506,6 +493,15 @@ sigreturn(struct thread *td, struct sigreturn_args *uap)
return (EJUSTRETURN);
}
+#ifdef COMPAT_FREEBSD4
+int
+freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap)
+{
+
+ return sigreturn(td, (struct sigreturn_args *)uap);
+}
+#endif
+
/*
* Exit the kernel and execute a firmware call that will not return, as
* specified by the arguments.
OpenPOWER on IntegriCloud