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. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * @(#)signal.h 8.1 (Berkeley) 6/11/93
36 * $FreeBSD: src/sys/i386/include/signal.h,v 1.12 1999/11/12 13:52:11 marcel Exp $
39 #ifndef _CPU_SIGNAL_H_
40 #define _CPU_SIGNAL_H_
43 /* codes for SIGILL */
44 #define ILL_ILLOPC 1 /* Illegal opcode. */
45 #define ILL_ILLOPN 2 /* Illegal operand. */
46 #define ILL_ILLADR 3 /* Illegal addressing mode. */
47 #define ILL_ILLTRP 4 /* Illegal trap. */
48 #define ILL_PRVOPC 5 /* Privileged opcode. */
49 #define ILL_PRVREG 6 /* Privileged register. */
50 #define ILL_COPROC 7 /* Coprocessor error. */
51 #define ILL_BADSTK 8 /* Internal stack error. */
53 /* codes for SIGBUS */
54 #define BUS_ADRALN 1 /* Invalid address alignment. */
55 #define BUS_ADRERR 2 /* Nonexistent physical address. */
56 #define BUS_OBJERR 3 /* Object-specific hardware error. */
58 /* codes for SIGSEGV */
59 #define SEGV_MAPERR 1 /* Address not mapped to object. */
60 #define SEGV_ACCERR 2 /* Invalid permissions for mapped */
63 /* codes for SIGFPE */
64 #define FPE_INTOVF 1 /* Integer overflow. */
65 #define FPE_INTDIV 2 /* Integer divide by zero. */
66 #define FPE_FLTDIV 3 /* Floating point divide by zero. */
67 #define FPE_FLTOVF 4 /* Floating point overflow. */
68 #define FPE_FLTUND 5 /* Floating point underflow. */
69 #define FPE_FLTRES 6 /* Floating point inexact result. */
70 #define FPE_FLTINV 7 /* Invalid floating point operation. */
71 #define FPE_FLTSUB 8 /* Subscript out of range. */
73 /* codes for SIGTRAP */
74 #define TRAP_BRKPT 1 /* Process breakpoint. */
75 #define TRAP_TRACE 2 /* Process trace trap. */
77 /* codes for SIGCHLD */
78 #define CLD_EXITED 1 /* Child has exited */
79 #define CLD_KILLED 2 /* Child has terminated abnormally but */
80 /* did not create a core file */
81 #define CLD_DUMPED 3 /* Child has terminated abnormally and */
82 /* created a core file */
83 #define CLD_TRAPPED 4 /* Traced child has trapped */
84 #define CLD_STOPPED 5 /* Child has stopped */
85 #define CLD_CONTINUED 6 /* Stopped child has continued */
87 /* codes for SIGPOLL */
88 #define POLL_IN 1 /* Data input available */
89 #define POLL_OUT 2 /* Output buffers available */
90 #define POLL_MSG 3 /* Input message available */
91 #define POLL_ERR 4 /* I/O Error */
92 #define POLL_PRI 5 /* High priority input available */
93 #define POLL_HUP 4 /* Device disconnected */
96 * Machine-dependent signal definitions
99 typedef int sig_atomic_t;
101 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
103 #include <machine/trap.h> /* codes for SIGILL, SIGFPE */
106 * Information pushed on stack when a signal is delivered.
107 * This is used by the kernel to restore state following
108 * execution of the signal handler. It is also made available
109 * to the handler to allow it to restore state properly if
110 * a non-standard exit is performed.
112 * The sequence of the fields/registers in struct sigcontext should match
113 * those in mcontext_t.
116 sigset_t sc_mask; /* signal mask to restore */
118 long sc_onstack; /* sigstack state to restore */
146 unsigned int sc_fpformat;
147 unsigned int sc_ownedfp;
148 unsigned int sc_reserved;
149 unsigned int sc_unused01;
150 unsigned int sc_unused02;
152 /* 16 byte aligned */
158 #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
160 #endif /* !_CPU_SIGNAL_H_ */