From cda69c96226e8d1ab1647199344302d2d5f4cf02 Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 20 Feb 2013 17:39:52 +0000 Subject: 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. --- sys/i386/include/signal.h | 73 +---------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) (limited to 'sys/i386/include/signal.h') 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 -#include - -/* - * Machine-dependent signal definitions - */ - -typedef int sig_atomic_t; - -#if __BSD_VISIBLE -#include /* 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 #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 and 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_ */ -- cgit v1.1