diff options
author | deischen <deischen@FreeBSD.org> | 2002-02-17 17:40:34 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2002-02-17 17:40:34 +0000 |
commit | d948dbd9bc544b1a1453a01158b3c82583e62d4f (patch) | |
tree | ce2496353fd641843d92285dae19123ceeb99292 /sys/i386 | |
parent | 9cc19e2aaad6a408571bde1182fa2ce368108894 (diff) | |
download | FreeBSD-src-d948dbd9bc544b1a1453a01158b3c82583e62d4f.zip FreeBSD-src-d948dbd9bc544b1a1453a01158b3c82583e62d4f.tar.gz |
Use struct __ucontext in prototypes and associated functions instead of
ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and
remove reliance on <sys/ucontext.h> being included.
While I'm here, also hide osigcontext types from userland; suggested
by bde.
Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/genassym.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/include/sigframe.h | 3 | ||||
-rw-r--r-- | sys/i386/include/signal.h | 5 |
4 files changed, 10 insertions, 2 deletions
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index f2c4a29..1fe8a2e 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -50,6 +50,7 @@ #include <sys/mutex.h> #include <sys/socket.h> #include <sys/resourcevar.h> +#include <sys/ucontext.h> #include <sys/user.h> #include <machine/bootinfo.h> #include <machine/tss.h> diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c6bdb57..43a4c8b 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -72,6 +72,7 @@ #include <sys/msgbuf.h> #include <sys/sysent.h> #include <sys/sysctl.h> +#include <sys/ucontext.h> #include <sys/vmmeter.h> #include <sys/bus.h> #include <sys/eventhandler.h> @@ -706,7 +707,7 @@ int sigreturn(td, uap) struct thread *td; struct sigreturn_args /* { - ucontext_t *sigcntxp; + const __ucontext *sigcntxp; } */ *uap; { struct proc *p = td->td_proc; diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h index 27be404..947743d 100644 --- a/sys/i386/include/sigframe.h +++ b/sys/i386/include/sigframe.h @@ -34,7 +34,7 @@ /* * Signal frames, arguments passed to application signal handlers. */ - +#ifdef _KERNEL struct osigframe { /* * The first four members may be used by applications. @@ -69,6 +69,7 @@ struct osigframe { /* In the SA_SIGINFO case, sf_arg2 points here. */ osiginfo_t sf_siginfo; }; +#endif struct sigframe { /* diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index 74accc8..603a14f 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -54,6 +54,10 @@ typedef int sig_atomic_t; #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ /* + * Only the kernel should need these old type definitions. + */ +#ifdef _KERNEL +/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available @@ -85,6 +89,7 @@ struct osigcontext { int sc_trapno; int sc_err; }; +#endif /* * The sequence of the fields/registers in struct sigcontext should match |