xref: /titanic_52/usr/src/lib/libbc/libc/sys/common/signalmap.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 1990 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 
30 #define	XSIGUSR1 	16	/* user defined signal 1 */
31 #define	XSIGUSR2 	17	/* user defined signal 2 */
32 #define	XSIGCLD		18	/* System V name for SIGCHLD */
33 #define XSIGPWR		19	/* power-fail restart */
34 #define	XSIGWINCH 	20	/* window changed */
35 #define	XSIGURG		21	/* urgent condition on IO channel */
36 #define	XSIGIO		22	/* input/output possible signal */
37 #define	XSIGSTOP	23	/* sendable stop signal not from tty */
38 #define	XSIGTSTP	24	/* stop signal from tty */
39 #define	XSIGCONT	25	/* continue a stopped process */
40 #define	XSIGTTIN	26	/* to readers pgrp upon background tty read */
41 #define	XSIGTTOU	27	/* like TTIN for output */
42 #define	XSIGVTALRM 	28	/* virtual time alarm */
43 #define	XSIGPROF	29	/* profiling time alarm */
44 #define	XSIGXCPU	30	/* exceeded CPU time limit */
45 #define	XSIGXFSZ	31	/* exceeded file size limit */
46 
47 
48 /* SVR4 siginfo_t structure */
49 #define SI_PAD	((128/sizeof(int)) -3)
50 
51 typedef struct siginfo {
52 
53         int     si_signo;                       /* signal from signal.h */
54         int     si_code;                        /* code from above      */
55         int     si_errno;                       /* error from errno.h   */
56 
57         union {
58 
59                 int     _pad[SI_PAD];           /* for future growth    */
60 
61                 struct {                        /* kill(), SIGCLD       */
62                         long   _pid;           /* process ID           */
63                         union {
64                                 struct {
65                                         long   _uid;
66                                 } _kill;
67                                 struct {
68                                         long _utime;
69                                         int     _status;
70                                         long _stime;
71                                 } _cld;
72                         } _pdata;
73                 } _proc;
74 
75                 struct {        /* SIGSEGV, SIGBUS, SIGILL and SIGFPE   */
76                         char * _addr;          /* faulting address     */
77                 } _fault;
78 
79                 struct {                        /* SIGPOLL, SIGXFSZ     */
80                 /* fd not currently available for SIGPOLL */
81                         int     _fd;            /* file descriptor      */
82                         long    _band;
83                 } _file;
84 
85         } _data;
86 
87 } siginfo_t;
88 
89 #define si_pid		_data._proc._pid
90 #define si_status	_data._proc._pdata._cld._status
91 #define si_addr		_data._fault._addr
92