diff options
author | kib <kib@FreeBSD.org> | 2013-02-20 17:39:52 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-02-20 17:39:52 +0000 |
commit | cda69c96226e8d1ab1647199344302d2d5f4cf02 (patch) | |
tree | e11ca597288ba6690ebab08a041053e2d8a5a6e8 /sys/i386/include/signal.h | |
parent | d04ffbb5a5cb5fa49847b87fbff94d4c6be4bfe9 (diff) | |
download | FreeBSD-src-cda69c96226e8d1ab1647199344302d2d5f4cf02.zip FreeBSD-src-cda69c96226e8d1ab1647199344302d2d5f4cf02.tar.gz |
Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.
Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.
The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host. The same hack could be usefully abused by
other code too.
Diffstat (limited to 'sys/i386/include/signal.h')
-rw-r--r-- | sys/i386/include/signal.h | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index 892115b..26c1ee6 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -33,25 +33,7 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ -#include <sys/cdefs.h> -#include <sys/_sigset.h> - -/* - * Machine-dependent signal definitions - */ - -typedef int sig_atomic_t; - -#if __BSD_VISIBLE -#include <machine/trap.h> /* codes for SIGILL, SIGFPE */ - -/* - * 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 - * to the handler to allow it to restore state properly if - * a non-standard exit is performed. - */ +#include <x86/signal.h> #if defined(_KERNEL) && defined(COMPAT_43) /* @@ -82,57 +64,4 @@ struct osigcontext { }; #endif -/* - * The sequence of the fields/registers in struct sigcontext should match - * those in mcontext_t and struct trapframe. - */ -struct sigcontext { - struct __sigset sc_mask; /* signal mask to restore */ - int sc_onstack; /* sigstack state to restore */ - int sc_gs; /* machine state (struct trapframe) */ - int sc_fs; - int sc_es; - int sc_ds; - int sc_edi; - int sc_esi; - int sc_ebp; - int sc_isp; - int sc_ebx; - int sc_edx; - int sc_ecx; - int sc_eax; - int sc_trapno; - int sc_err; - int sc_eip; - int sc_cs; - int sc_efl; - int sc_esp; - int sc_ss; - int sc_len; /* sizeof(mcontext_t) */ - /* - * See <machine/ucontext.h> and <machine/npx.h> for - * the following fields. - */ - int sc_fpformat; - int sc_ownedfp; - int sc_flags; - int sc_fpstate[128] __aligned(16); - - int sc_fsbase; - int sc_gsbase; - - int sc_xfpustate; - int sc_xfpustate_len; - - int sc_spare2[4]; -}; - -#define sc_sp sc_esp -#define sc_fp sc_ebp -#define sc_pc sc_eip -#define sc_ps sc_efl -#define sc_eflags sc_efl - -#endif /* __BSD_VISIBLE */ - #endif /* !_MACHINE_SIGNAL_H_ */ |