2 * Copyright (c) 1986, 1989, 1991, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2008 The DragonFly Project.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * @(#)signal.h 8.1 (Berkeley) 6/11/93
32 * $FreeBSD: src/sys/i386/include/signal.h,v 1.12 1999/11/12 13:52:11 marcel Exp $
35 #ifndef _CPU_SIGNAL_H_
36 #define _CPU_SIGNAL_H_
39 * Machine-dependent signal definitions
42 typedef int sig_atomic_t;
46 #include <machine/trap.h> /* codes for SIGILL, SIGFPE */
49 * Information pushed on stack when a signal is delivered.
50 * This is used by the kernel to restore state following
51 * execution of the signal handler. It is also made available
52 * to the handler to allow it to restore state properly if
53 * a non-standard exit is performed.
55 * The sequence of the fields/registers in struct sigcontext should match
56 * those in mcontext_t.
59 sigset_t sc_mask
; /* signal mask to restore */
61 long sc_onstack
; /* sigstack state to restore */
89 unsigned int sc_fpformat
;
90 unsigned int sc_ownedfp
;
91 unsigned int sc_reserved
;
92 unsigned int sc_unused
[8];
95 int sc_fpregs
[256]; /* 1024 bytes */
96 } __attribute__((aligned(64)));
98 #endif /* __BSD_VISIBLE */
101 * Tells the kernel how many pages to drop the signal trampoline down
102 * when mapping it. Must be at least 1 page because kern_exec mprotects
103 * it to R+X (making it unwritable).
105 #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
106 #define SZSIGCODE_EXTRA_BYTES (1*PAGE_SIZE)
109 #endif /* !_CPU_SIGNAL_H_ */