xref: /titanic_41/usr/src/uts/common/sys/iso/signal_iso.h (revision 70818f5837509317d1f5dac4d82d7b5a2d547c29)
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 1993-2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 /*
32  * An application should not include this header directly.  Instead it
33  * should be included only through the inclusion of other Sun headers.
34  *
35  * The contents of this header is limited to identifiers specified in the
36  * C Standard.  Any new identifiers specified in future amendments to the
37  * C Standard must be placed in this header.  If these new identifiers
38  * are required to also be in the C++ Standard "std" namespace, then for
39  * anything other than macro definitions, corresponding "using" directives
40  * must also be added to <sys/signal.h.h>.
41  */
42 
43 #ifndef _SYS_SIGNAL_ISO_H
44 #define	_SYS_SIGNAL_ISO_H
45 
46 #pragma ident	"%Z%%M%	%I%	%E% SMI" /* SVr4.0 11.44 */
47 
48 #include <sys/unistd.h>		/* needed for _SC_SIGRT_MIN/MAX */
49 
50 #ifdef	__cplusplus
51 extern "C" {
52 #endif
53 
54 #define	SIGHUP	1	/* hangup */
55 #define	SIGINT	2	/* interrupt (rubout) */
56 #define	SIGQUIT	3	/* quit (ASCII FS) */
57 #define	SIGILL	4	/* illegal instruction (not reset when caught) */
58 #define	SIGTRAP	5	/* trace trap (not reset when caught) */
59 #define	SIGIOT	6	/* IOT instruction */
60 #define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
61 #define	SIGEMT	7	/* EMT instruction */
62 #define	SIGFPE	8	/* floating point exception */
63 #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
64 #define	SIGBUS	10	/* bus error */
65 #define	SIGSEGV	11	/* segmentation violation */
66 #define	SIGSYS	12	/* bad argument to system call */
67 #define	SIGPIPE	13	/* write on a pipe with no one to read it */
68 #define	SIGALRM	14	/* alarm clock */
69 #define	SIGTERM	15	/* software termination signal from kill */
70 #define	SIGUSR1	16	/* user defined signal 1 */
71 #define	SIGUSR2	17	/* user defined signal 2 */
72 #define	SIGCLD	18	/* child status change */
73 #define	SIGCHLD	18	/* child status change alias (POSIX) */
74 #define	SIGPWR	19	/* power-fail restart */
75 #define	SIGWINCH 20	/* window size change */
76 #define	SIGURG	21	/* urgent socket condition */
77 #define	SIGPOLL 22	/* pollable event occured */
78 #define	SIGIO	SIGPOLL	/* socket I/O possible (SIGPOLL alias) */
79 #define	SIGSTOP 23	/* stop (cannot be caught or ignored) */
80 #define	SIGTSTP 24	/* user stop requested from tty */
81 #define	SIGCONT 25	/* stopped process has been continued */
82 #define	SIGTTIN 26	/* background tty read attempted */
83 #define	SIGTTOU 27	/* background tty write attempted */
84 #define	SIGVTALRM 28	/* virtual timer expired */
85 #define	SIGPROF 29	/* profiling timer expired */
86 #define	SIGXCPU 30	/* exceeded cpu limit */
87 #define	SIGXFSZ 31	/* exceeded file size limit */
88 #define	SIGWAITING 32	/* reserved signal no longer used by threading code */
89 #define	SIGLWP	33	/* reserved signal no longer used by threading code */
90 #define	SIGFREEZE 34	/* special signal used by CPR */
91 #define	SIGTHAW 35	/* special signal used by CPR */
92 #define	SIGCANCEL 36	/* reserved signal for thread cancellation */
93 #define	SIGLOST	37	/* resource lost (eg, record-lock lost) */
94 #define	SIGXRES	38	/* resource control exceeded */
95 #define	SIGJVM1	39	/* reserved signal for Java Virtual Machine */
96 #define	SIGJVM2	40	/* reserved signal for Java Virtual Machine */
97 
98 /* insert new signals here, and move _SIGRTM* appropriately */
99 #define	_SIGRTMIN 41	/* first (highest-priority) realtime signal */
100 #define	_SIGRTMAX 48	/* last (lowest-priority) realtime signal */
101 extern long _sysconf(int);	/* System Private interface to sysconf() */
102 #define	SIGRTMIN ((int)_sysconf(_SC_SIGRT_MIN))	/* first realtime signal */
103 #define	SIGRTMAX ((int)_sysconf(_SC_SIGRT_MAX))	/* last realtime signal */
104 
105 #if	defined(__cplusplus)
106 
107 typedef	void SIG_FUNC_TYP(int);
108 typedef	SIG_FUNC_TYP *SIG_TYP;
109 #define	SIG_PF SIG_TYP
110 
111 #define	SIG_DFL	(SIG_PF)0
112 #define	SIG_ERR (SIG_PF)-1
113 #define	SIG_IGN	(SIG_PF)1
114 #define	SIG_HOLD (SIG_PF)2
115 
116 #elif	defined(__lint)
117 
118 #define	SIG_DFL	(void(*)())0
119 #define	SIG_ERR (void(*)())0
120 #define	SIG_IGN	(void (*)())0
121 #define	SIG_HOLD (void(*)())0
122 
123 #else
124 
125 #define	SIG_DFL	(void(*)())0
126 #define	SIG_ERR	(void(*)())-1
127 #define	SIG_IGN	(void (*)())1
128 #define	SIG_HOLD (void(*)())2
129 
130 #endif
131 
132 #define	SIG_BLOCK	1
133 #define	SIG_UNBLOCK	2
134 #define	SIG_SETMASK	3
135 
136 #define	SIGNO_MASK	0xFF
137 #define	SIGDEFER	0x100
138 #define	SIGHOLD		0x200
139 #define	SIGRELSE	0x400
140 #define	SIGIGNORE	0x800
141 #define	SIGPAUSE	0x1000
142 
143 #ifdef	__cplusplus
144 }
145 #endif
146 
147 #endif /* _SYS_SIGNAL_ISO_H */
148