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/alpha | |
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/alpha')
-rw-r--r-- | sys/alpha/alpha/machdep.c | 3 | ||||
-rw-r--r-- | sys/alpha/include/sigframe.h | 8 | ||||
-rw-r--r-- | sys/alpha/include/signal.h | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index da5b444..6b8023d 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -128,6 +128,7 @@ #include <vm/vm_pager.h> #include <sys/user.h> #include <sys/ptrace.h> +#include <sys/ucontext.h> #include <machine/clock.h> #include <machine/md_var.h> #include <machine/reg.h> @@ -1506,7 +1507,7 @@ osigreturn(struct thread *td, int sigreturn(struct thread *td, struct sigreturn_args /* { - ucontext_t *sigcntxp; + const struct __ucontext *sigcntxp; } */ *uap) { ucontext_t uc, *ucp; diff --git a/sys/alpha/include/sigframe.h b/sys/alpha/include/sigframe.h index 4ed62f4..eb8039b 100644 --- a/sys/alpha/include/sigframe.h +++ b/sys/alpha/include/sigframe.h @@ -31,15 +31,17 @@ #ifndef _MACHINE_SIGFRAME_H_ #define _MACHINE_SIGFRAME_H_ 1 +#ifdef _KERNEL struct osigframe { struct osigcontext sf_sc; osiginfo_t sf_si; }; +#endif struct sigframe { - unsigned long __spare__; - ucontext_t sf_uc; - siginfo_t sf_si; + unsigned long __spare__; + struct __ucontext sf_uc; + siginfo_t sf_si; }; #endif /* _MACHINE_SIGFRAME_H_ */ diff --git a/sys/alpha/include/signal.h b/sys/alpha/include/signal.h index 4bc7b29..4b20eac 100644 --- a/sys/alpha/include/signal.h +++ b/sys/alpha/include/signal.h @@ -42,6 +42,10 @@ typedef long sig_atomic_t; #define MINSIGSTKSZ (1024 * 4) /* + * 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 @@ -70,6 +74,7 @@ struct osigcontext { unsigned long sc_traparg_a2; /* a2 argument to trap at exception */ long sc_xxx2[3]; /* sc_fp_trap_pc, sc_fp_trigger_sum, sc_fp_trigger_inst */ }; +#endif /* * The sequence of the fields should match those in |