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