diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2002-10-25 19:10:58 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2002-10-25 19:10:58 +0000 |
| commit | 23eeeff7bee66bd81fa2d7ec9d648339bd0d041f (patch) | |
| tree | 96a1089f558875f808b1fd36f885179cd78f55de /sys/amd64/include | |
| parent | fb3a308a4ac3ca2c6fcd097a2990d7ea52ab230f (diff) | |
Notes
Diffstat (limited to 'sys/amd64/include')
| -rw-r--r-- | sys/amd64/include/md_var.h | 8 | ||||
| -rw-r--r-- | sys/amd64/include/sigframe.h | 18 | ||||
| -rw-r--r-- | sys/amd64/include/signal.h | 4 | ||||
| -rw-r--r-- | sys/amd64/include/ucontext.h | 28 |
4 files changed, 54 insertions, 4 deletions
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index f449c045d459..9fa396876854 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -56,7 +56,13 @@ extern int need_post_dma_flush; #endif extern void (*ovbcopy_vector)(const void *from, void *to, size_t len); extern char sigcode[]; -extern int szsigcode, szosigcode; +extern int szsigcode; +#ifdef COMPAT_FREEBSD4 +extern int szfreebsd4_sigcode; +#endif +#ifdef COMPAT_43 +extern int szosigcode; +#endif typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; diff --git a/sys/amd64/include/sigframe.h b/sys/amd64/include/sigframe.h index 947743d2c0c0..98be731d8f10 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 { /* diff --git a/sys/amd64/include/signal.h b/sys/amd64/include/signal.h index 9fcca63f1aab..29a97767cc69 100644 --- a/sys/amd64/include/signal.h +++ b/sys/amd64/include/signal.h @@ -60,7 +60,7 @@ typedef int sig_atomic_t; /* * Only the kernel should need these old type definitions. */ -#ifdef _KERNEL +#if defined(_KERNEL) && defined(COMPAT_43) /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -68,8 +68,6 @@ typedef int sig_atomic_t; * to the handler to allow it to restore state properly if * a non-standard exit is performed. */ -typedef unsigned int osigset_t; - struct osigcontext { int sc_onstack; /* sigstack state to restore */ osigset_t sc_mask; /* signal mask to restore */ diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h index d02959c232d3..af9b4fd3e732 100644 --- a/sys/amd64/include/ucontext.h +++ b/sys/amd64/include/ucontext.h @@ -73,6 +73,34 @@ typedef struct __mcontext { } mcontext_t; #ifdef _KERNEL +#ifdef COMPAT_FREEBSD4 +/* For 4.x binaries */ +struct mcontext4 { + int mc_onstack; /* XXX - sigcontext compat. */ + int mc_gs; + int mc_fs; + int mc_es; + int mc_ds; + int mc_edi; + int mc_esi; + int mc_ebp; + int mc_isp; + int mc_ebx; + int mc_edx; + int mc_ecx; + int mc_eax; + int mc_trapno; + int mc_err; + int mc_eip; + int mc_cs; + int mc_eflags; + int mc_esp; /* machine state */ + int mc_ss; + int mc_fpregs[28]; /* env87 + fpacc87 + u_long */ + int __spare__[17]; +}; +#endif + struct thread; void get_mcontext(struct thread *td, mcontext_t *mcp); |
