1139743Simp/*-
243412Snewton * Copyright (c) 1998 Mark Newton
343412Snewton * Copyright (c) 1994 Christos Zoulas
443412Snewton * All rights reserved.
543412Snewton *
643412Snewton * Redistribution and use in source and binary forms, with or without
743412Snewton * modification, are permitted provided that the following conditions
843412Snewton * are met:
943412Snewton * 1. Redistributions of source code must retain the above copyright
1043412Snewton *    notice, this list of conditions and the following disclaimer.
1143412Snewton * 2. Redistributions in binary form must reproduce the above copyright
1243412Snewton *    notice, this list of conditions and the following disclaimer in the
1343412Snewton *    documentation and/or other materials provided with the distribution.
1443412Snewton * 3. The name of the author may not be used to endorse or promote products
1543412Snewton *    derived from this software without specific prior written permission
1643412Snewton *
1743412Snewton * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1843412Snewton * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1943412Snewton * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2043412Snewton * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2143412Snewton * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2243412Snewton * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2343412Snewton * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2443412Snewton * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2543412Snewton * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2643412Snewton * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2749267Snewton *
2850477Speter * $FreeBSD$
2943412Snewton */
3043412Snewton
3143412Snewton#ifndef	_SVR4_SIGINFO_H_
3243412Snewton#define	_SVR4_SIGINFO_H_
3343412Snewton
3443412Snewton#define	SVR4_ILL_ILLOPC		1
3543412Snewton#define	SVR4_ILL_ILLOPN		2
3643412Snewton#define	SVR4_ILL_ILLADR		3
3743412Snewton#define	SVR4_ILL_ILLTRP		4
3843412Snewton#define	SVR4_ILL_PRVOPC		5
3943412Snewton#define	SVR4_ILL_PRVREG		6
4043412Snewton#define	SVR4_ILL_COPROC		7
4143412Snewton#define	SVR4_ILL_BADSTK		8
4243412Snewton
4343412Snewton#define	SVR4_FPE_INTDIV		1
4443412Snewton#define	SVR4_FPE_INTOVF		2
4543412Snewton#define	SVR4_FPE_FLTDIV		3
4643412Snewton#define	SVR4_FPE_FLTOVF		4
4743412Snewton#define	SVR4_FPE_FLTUND		5
4843412Snewton#define	SVR4_FPE_FLTRES		6
4943412Snewton#define	SVR4_FPE_FLTINV		7
5043412Snewton#define SVR4_FPE_FLTSUB		8
5143412Snewton
5243412Snewton#define	SVR4_SEGV_MAPERR	1
5343412Snewton#define	SVR4_SEGV_ACCERR	2
5443412Snewton
5543412Snewton#define	SVR4_BUS_ADRALN		1
5643412Snewton#define	SVR4_BUS_ADRERR		2
5743412Snewton#define	SVR4_BUS_OBJERR		3
5843412Snewton
5943412Snewton#define SVR4_TRAP_BRKPT		1
6043412Snewton#define SVR4_TRAP_TRACE		2
6143412Snewton
6243412Snewton#define SVR4_POLL_IN		1
6343412Snewton#define	SVR4_POLL_OUT		2
6443412Snewton#define	SVR4_POLL_MSG		3
6543412Snewton#define	SVR4_POLL_ERR		4
6643412Snewton#define	SVR4_POLL_PRI		5
6743412Snewton
6843412Snewton#define	SVR4_CLD_EXITED		1
6943412Snewton#define	SVR4_CLD_KILLED		2
7043412Snewton#define	SVR4_CLD_DUMPED		3
7143412Snewton#define	SVR4_CLD_TRAPPED	4
7243412Snewton#define	SVR4_CLD_STOPPED	5
7343412Snewton#define	SVR4_CLD_CONTINUED	6
7443412Snewton
7543412Snewton#define SVR4_EMT_TAGOVF		1
7643412Snewton
7743412Snewtontypedef union svr4_siginfo {
7843412Snewton	char	si_pad[128];	/* Total size; for future expansion */
7943412Snewton	struct {
8043412Snewton		int				_signo;
8143412Snewton		int				_code;
8243412Snewton		int				_errno;
8343412Snewton		union {
8443412Snewton			struct {
8543412Snewton				svr4_pid_t	_pid;
8643412Snewton				svr4_clock_t	_utime;
8743412Snewton				int		_status;
8843412Snewton				svr4_clock_t	_stime;
8943412Snewton			} _child;
9043412Snewton
9143412Snewton			struct {
9243412Snewton				caddr_t		_addr;
9343412Snewton				int		_trap;
9443412Snewton			} _fault;
9543412Snewton		} _reason;
9643412Snewton	} _info;
9743412Snewton} svr4_siginfo_t;
9843412Snewton
99151463Sdavidxu#define	svr4_si_signo	_info._signo
100151463Sdavidxu#define	svr4_si_code	_info._code
101151463Sdavidxu#define	svr4_si_errno	_info._errno
10243412Snewton
103151463Sdavidxu#define svr4_si_pid	_info._reason._child._pid
104151463Sdavidxu#define svr4_si_stime	_info._reason._child._stime
105151463Sdavidxu#define svr4_si_status	_info._reason._child._status
106151463Sdavidxu#define svr4_si_utime	_info._reason._child._utime
10743412Snewton
108151463Sdavidxu#define svr4_si_addr	_info._reason._fault._addr
109151463Sdavidxu#define svr4_si_trap	_info._reason._fault._trap
11043412Snewton
11143412Snewton#endif /* !_SVR4_SIGINFO_H_ */
112