xref: /illumos-gate/usr/src/uts/sparc/sys/machsig.h (revision 43449cdcd0600512dd862537f2cf014140dd0844)
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 /*	Copyright (c) 1988 AT&T	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 /*
27  * Copyright (c) 1998-1999 by Sun Microsystems, Inc.
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  * SPARC Version
42  */
43 
44 /*
45  * machsig.h is the machine dependent portion of siginfo.h (and is
46  * included by siginfo.h). A version of machsig.h should exist for
47  * each architecture. The codes for SIGILL, SIGFPE, SIGSEGV and SIGBUS
48  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
49  * SIGPOLL are architecture independent and may be found in siginfo.h.
50  */
51 
52 #if !defined(_POSIX_C_SOURCE) || defined(_XPG4_2) || defined(__EXTENSIONS__)
53 
54 /*
55  * SIGILL signal codes
56  */
57 
58 #define	ILL_ILLOPC	1	/* illegal opcode */
59 #define	ILL_ILLOPN	2	/* illegal operand */
60 #define	ILL_ILLADR	3	/* illegal addressing mode */
61 #define	ILL_ILLTRP	4	/* illegal trap */
62 #define	ILL_PRVOPC	5	/* privileged opcode */
63 #define	ILL_PRVREG	6	/* privileged register */
64 #define	ILL_COPROC	7	/* co-processor */
65 #define	ILL_BADSTK	8	/* bad stack */
66 
67 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
68 #define	NSIGILL		8
69 #endif
70 
71 /*
72  * SIGEMT signal codes
73  */
74 
75 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
76 #define	EMT_TAGOVF	1	/* tag overflow */
77 #define	EMT_CPCOVF	2	/* CPU performance counter overflow */
78 #define	NSIGEMT		2
79 #endif
80 
81 /*
82  * SIGFPE signal codes
83  */
84 
85 #define	FPE_INTDIV	1	/* integer divide by zero */
86 #define	FPE_INTOVF	2	/* integer overflow */
87 #define	FPE_FLTDIV	3	/* floating point divide by zero */
88 #define	FPE_FLTOVF	4	/* floating point overflow */
89 #define	FPE_FLTUND	5	/* floating point underflow */
90 #define	FPE_FLTRES	6	/* floating point inexact result */
91 #define	FPE_FLTINV	7	/* invalid floating point operation */
92 #define	FPE_FLTSUB	8	/* subscript out of range */
93 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
94 #define	NSIGFPE		8
95 #endif
96 
97 /*
98  * SIGSEGV signal codes
99  */
100 
101 #define	SEGV_MAPERR	1	/* address not mapped to object */
102 #define	SEGV_ACCERR	2	/* invalid permissions */
103 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
104 #define	NSIGSEGV	2
105 #endif
106 
107 /*
108  * SIGBUS signal codes
109  */
110 
111 #define	BUS_ADRALN	1	/* invalid address alignment */
112 #define	BUS_ADRERR	2	/* non-existent physical address */
113 #ifndef BUS_OBJERR		/* also defined in ucbinclude/sys/signal.h */
114 #define	BUS_OBJERR	3	/* object specific hardware error */
115 #endif
116 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
117 #define	NSIGBUS		3
118 #endif
119 
120 #endif	/* _POSIX_C_SOURCE || defined(_XPG4_2) || defined(__EXTENSIONS__) */
121 
122 #ifdef	__cplusplus
123 }
124 #endif
125 
126 #endif	/* _SYS_MACHSIG_H */
127