xref: /onnv-gate/usr/src/uts/common/sys/iso/signal_iso.h (revision 11913:283e725df792)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
510927SRoger.Faulkner@Sun.COM  * Common Development and Distribution License (the "License").
610927SRoger.Faulkner@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
2110927SRoger.Faulkner@Sun.COM 
220Sstevel@tonic-gate /*
23*11913SRoger.Faulkner@Sun.COM  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
280Sstevel@tonic-gate /*	  All Rights Reserved  	*/
290Sstevel@tonic-gate 
300Sstevel@tonic-gate /*
310Sstevel@tonic-gate  * An application should not include this header directly.  Instead it
320Sstevel@tonic-gate  * should be included only through the inclusion of other Sun headers.
330Sstevel@tonic-gate  *
340Sstevel@tonic-gate  * The contents of this header is limited to identifiers specified in the
350Sstevel@tonic-gate  * C Standard.  Any new identifiers specified in future amendments to the
360Sstevel@tonic-gate  * C Standard must be placed in this header.  If these new identifiers
370Sstevel@tonic-gate  * are required to also be in the C++ Standard "std" namespace, then for
380Sstevel@tonic-gate  * anything other than macro definitions, corresponding "using" directives
390Sstevel@tonic-gate  * must also be added to <sys/signal.h.h>.
400Sstevel@tonic-gate  */
410Sstevel@tonic-gate 
420Sstevel@tonic-gate #ifndef _SYS_SIGNAL_ISO_H
430Sstevel@tonic-gate #define	_SYS_SIGNAL_ISO_H
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #include <sys/unistd.h>		/* needed for _SC_SIGRT_MIN/MAX */
460Sstevel@tonic-gate 
470Sstevel@tonic-gate #ifdef	__cplusplus
480Sstevel@tonic-gate extern "C" {
490Sstevel@tonic-gate #endif
500Sstevel@tonic-gate 
510Sstevel@tonic-gate #define	SIGHUP	1	/* hangup */
520Sstevel@tonic-gate #define	SIGINT	2	/* interrupt (rubout) */
530Sstevel@tonic-gate #define	SIGQUIT	3	/* quit (ASCII FS) */
540Sstevel@tonic-gate #define	SIGILL	4	/* illegal instruction (not reset when caught) */
550Sstevel@tonic-gate #define	SIGTRAP	5	/* trace trap (not reset when caught) */
560Sstevel@tonic-gate #define	SIGIOT	6	/* IOT instruction */
570Sstevel@tonic-gate #define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
580Sstevel@tonic-gate #define	SIGEMT	7	/* EMT instruction */
590Sstevel@tonic-gate #define	SIGFPE	8	/* floating point exception */
600Sstevel@tonic-gate #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
610Sstevel@tonic-gate #define	SIGBUS	10	/* bus error */
620Sstevel@tonic-gate #define	SIGSEGV	11	/* segmentation violation */
630Sstevel@tonic-gate #define	SIGSYS	12	/* bad argument to system call */
640Sstevel@tonic-gate #define	SIGPIPE	13	/* write on a pipe with no one to read it */
650Sstevel@tonic-gate #define	SIGALRM	14	/* alarm clock */
660Sstevel@tonic-gate #define	SIGTERM	15	/* software termination signal from kill */
670Sstevel@tonic-gate #define	SIGUSR1	16	/* user defined signal 1 */
680Sstevel@tonic-gate #define	SIGUSR2	17	/* user defined signal 2 */
690Sstevel@tonic-gate #define	SIGCLD	18	/* child status change */
700Sstevel@tonic-gate #define	SIGCHLD	18	/* child status change alias (POSIX) */
710Sstevel@tonic-gate #define	SIGPWR	19	/* power-fail restart */
720Sstevel@tonic-gate #define	SIGWINCH 20	/* window size change */
730Sstevel@tonic-gate #define	SIGURG	21	/* urgent socket condition */
740Sstevel@tonic-gate #define	SIGPOLL 22	/* pollable event occured */
750Sstevel@tonic-gate #define	SIGIO	SIGPOLL	/* socket I/O possible (SIGPOLL alias) */
760Sstevel@tonic-gate #define	SIGSTOP 23	/* stop (cannot be caught or ignored) */
770Sstevel@tonic-gate #define	SIGTSTP 24	/* user stop requested from tty */
780Sstevel@tonic-gate #define	SIGCONT 25	/* stopped process has been continued */
790Sstevel@tonic-gate #define	SIGTTIN 26	/* background tty read attempted */
800Sstevel@tonic-gate #define	SIGTTOU 27	/* background tty write attempted */
810Sstevel@tonic-gate #define	SIGVTALRM 28	/* virtual timer expired */
820Sstevel@tonic-gate #define	SIGPROF 29	/* profiling timer expired */
830Sstevel@tonic-gate #define	SIGXCPU 30	/* exceeded cpu limit */
840Sstevel@tonic-gate #define	SIGXFSZ 31	/* exceeded file size limit */
850Sstevel@tonic-gate #define	SIGWAITING 32	/* reserved signal no longer used by threading code */
860Sstevel@tonic-gate #define	SIGLWP	33	/* reserved signal no longer used by threading code */
870Sstevel@tonic-gate #define	SIGFREEZE 34	/* special signal used by CPR */
880Sstevel@tonic-gate #define	SIGTHAW 35	/* special signal used by CPR */
890Sstevel@tonic-gate #define	SIGCANCEL 36	/* reserved signal for thread cancellation */
900Sstevel@tonic-gate #define	SIGLOST	37	/* resource lost (eg, record-lock lost) */
910Sstevel@tonic-gate #define	SIGXRES	38	/* resource control exceeded */
920Sstevel@tonic-gate #define	SIGJVM1	39	/* reserved signal for Java Virtual Machine */
930Sstevel@tonic-gate #define	SIGJVM2	40	/* reserved signal for Java Virtual Machine */
940Sstevel@tonic-gate 
950Sstevel@tonic-gate /* insert new signals here, and move _SIGRTM* appropriately */
960Sstevel@tonic-gate #define	_SIGRTMIN 41	/* first (highest-priority) realtime signal */
97*11913SRoger.Faulkner@Sun.COM #define	_SIGRTMAX 72	/* last (lowest-priority) realtime signal */
980Sstevel@tonic-gate extern long _sysconf(int);	/* System Private interface to sysconf() */
990Sstevel@tonic-gate #define	SIGRTMIN ((int)_sysconf(_SC_SIGRT_MIN))	/* first realtime signal */
1000Sstevel@tonic-gate #define	SIGRTMAX ((int)_sysconf(_SC_SIGRT_MAX))	/* last realtime signal */
1010Sstevel@tonic-gate 
1020Sstevel@tonic-gate #if	defined(__cplusplus)
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate typedef	void SIG_FUNC_TYP(int);
1050Sstevel@tonic-gate typedef	SIG_FUNC_TYP *SIG_TYP;
1060Sstevel@tonic-gate #define	SIG_PF SIG_TYP
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate #define	SIG_DFL	(SIG_PF)0
1090Sstevel@tonic-gate #define	SIG_ERR (SIG_PF)-1
1100Sstevel@tonic-gate #define	SIG_IGN	(SIG_PF)1
1110Sstevel@tonic-gate #define	SIG_HOLD (SIG_PF)2
1120Sstevel@tonic-gate 
1130Sstevel@tonic-gate #elif	defined(__lint)
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate #define	SIG_DFL	(void(*)())0
1160Sstevel@tonic-gate #define	SIG_ERR (void(*)())0
1170Sstevel@tonic-gate #define	SIG_IGN	(void (*)())0
1180Sstevel@tonic-gate #define	SIG_HOLD (void(*)())0
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate #else
1210Sstevel@tonic-gate 
1220Sstevel@tonic-gate #define	SIG_DFL	(void(*)())0
1230Sstevel@tonic-gate #define	SIG_ERR	(void(*)())-1
1240Sstevel@tonic-gate #define	SIG_IGN	(void (*)())1
1250Sstevel@tonic-gate #define	SIG_HOLD (void(*)())2
1260Sstevel@tonic-gate 
1270Sstevel@tonic-gate #endif
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate #define	SIG_BLOCK	1
1300Sstevel@tonic-gate #define	SIG_UNBLOCK	2
1310Sstevel@tonic-gate #define	SIG_SETMASK	3
1320Sstevel@tonic-gate 
1330Sstevel@tonic-gate #ifdef	__cplusplus
1340Sstevel@tonic-gate }
1350Sstevel@tonic-gate #endif
1360Sstevel@tonic-gate 
1370Sstevel@tonic-gate #endif /* _SYS_SIGNAL_ISO_H */
138