xref: /illumos-gate/usr/src/uts/intel/sys/machsig.h (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1988 AT&T	*/
28 /*	  All Rights Reserved	*/
29 
30 
31 #ifndef	_SYS_MACHSIG_H
32 #define	_SYS_MACHSIG_H
33 
34 #include <sys/feature_tests.h>
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * machsig.h is the machine dependent portion of siginfo.h (and is
42  * included by siginfo.h). A version of machsig.h should exist for
43  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
44  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
45  * SIGPOLL are architecture independent and may be found in siginfo.h.
46  */
47 
48 #if !defined(_POSIX_C_SOURCE) || defined(_XPG4_2) || defined(__EXTENSIONS__)
49 
50 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
51 #include <vm/faultcode.h>
52 #endif
53 
54 /*
55  * SIGILL signal codes
56  */
57 #define	ILL_ILLOPC	1	/* illegal opcode */
58 #define	ILL_ILLOPN	2	/* illegal operand */
59 #define	ILL_ILLADR	3	/* illegal addressing mode */
60 #define	ILL_ILLTRP	4	/* illegal trap */
61 #define	ILL_PRVOPC	5	/* privileged opcode */
62 #define	ILL_PRVREG	6	/* privileged register */
63 #define	ILL_COPROC	7	/* co-processor */
64 #define	ILL_BADSTK	8	/* bad stack */
65 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
66 #define	NSIGILL		8
67 #endif
68 
69 /*
70  * SIGEMT signal codes
71  */
72 
73 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
74 #define	EMT_CPCOVF	1	/* CPU performance counter overflow */
75 #define	NSIGEMT		1
76 #endif
77 
78 /*
79  * SIGFPE signal codes
80  */
81 
82 #define	FPE_INTDIV	1	/* integer divide by zero */
83 #define	FPE_INTOVF	2	/* integer overflow */
84 #define	FPE_FLTDIV	3	/* floating point divide by zero */
85 #define	FPE_FLTOVF	4	/* floating point overflow */
86 #define	FPE_FLTUND	5	/* floating point underflow */
87 #define	FPE_FLTRES	6	/* floating point inexact result */
88 #define	FPE_FLTINV	7	/* invalid floating point operation */
89 #define	FPE_FLTSUB	8	/* subscript out of range */
90 #define	FPE_FLTDEN	9	/* floating point denormalize */
91 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
92 #define	NSIGFPE		9
93 #endif
94 
95 /*
96  * SIGSEGV signal codes
97  */
98 
99 #define	SEGV_MAPERR	1	/* address not mapped to object */
100 #define	SEGV_ACCERR	2	/* invalid permissions */
101 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
102 #define	NSIGSEGV	2
103 #endif
104 
105 /*
106  * SIGBUS signal codes
107  */
108 
109 #define	BUS_ADRALN	1	/* invalid address alignment */
110 #define	BUS_ADRERR	2	/* non-existent physical address */
111 #ifndef	BUS_OBJERR		/* also defined in ucbinclude/sys/signal.h */
112 #define	BUS_OBJERR	3	/* object specific hardware error */
113 #endif
114 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
115 #define	NSIGBUS		3
116 #endif
117 
118 #endif	/* !defined(_POSIX_C_SOURCE) || defined(_XPG4_2) ...  */
119 
120 #ifdef	__cplusplus
121 }
122 #endif
123 
124 #endif	/* _SYS_MACHSIG_H */
125