svr4_siginfo.h revision 139743
1116742Ssam/*- 2116904Ssam * Copyright (c) 1998 Mark Newton 3186904Ssam * Copyright (c) 1994 Christos Zoulas 4116742Ssam * All rights reserved. 5116742Ssam * 6116742Ssam * Redistribution and use in source and binary forms, with or without 7116742Ssam * modification, are permitted provided that the following conditions 8116742Ssam * are met: 9116742Ssam * 1. Redistributions of source code must retain the above copyright 10116742Ssam * notice, this list of conditions and the following disclaimer. 11116742Ssam * 2. Redistributions in binary form must reproduce the above copyright 12116742Ssam * notice, this list of conditions and the following disclaimer in the 13116742Ssam * documentation and/or other materials provided with the distribution. 14116742Ssam * 3. The name of the author may not be used to endorse or promote products 15116904Ssam * derived from this software without specific prior written permission 16116904Ssam * 17116904Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18116904Ssam * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19116904Ssam * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20116904Ssam * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21116904Ssam * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22116904Ssam * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23116904Ssam * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24116904Ssam * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25116904Ssam * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26116742Ssam * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27116742Ssam * 28116742Ssam * $FreeBSD: head/sys/compat/svr4/svr4_siginfo.h 139743 2005-01-05 22:34:37Z imp $ 29116742Ssam */ 30116742Ssam 31116742Ssam#ifndef _SVR4_SIGINFO_H_ 32116742Ssam#define _SVR4_SIGINFO_H_ 33116742Ssam 34116742Ssam#define SVR4_ILL_ILLOPC 1 35116742Ssam#define SVR4_ILL_ILLOPN 2 36117811Ssam#define SVR4_ILL_ILLADR 3 37117811Ssam#define SVR4_ILL_ILLTRP 4 38117811Ssam#define SVR4_ILL_PRVOPC 5 39117811Ssam#define SVR4_ILL_PRVREG 6 40172058Ssam#define SVR4_ILL_COPROC 7 41172058Ssam#define SVR4_ILL_BADSTK 8 42172058Ssam 43172058Ssam#define SVR4_FPE_INTDIV 1 44116742Ssam#define SVR4_FPE_INTOVF 2 45172058Ssam#define SVR4_FPE_FLTDIV 3 46116742Ssam#define SVR4_FPE_FLTOVF 4 47178354Ssam#define SVR4_FPE_FLTUND 5 48178354Ssam#define SVR4_FPE_FLTRES 6 49116742Ssam#define SVR4_FPE_FLTINV 7 50116742Ssam#define SVR4_FPE_FLTSUB 8 51178959Ssam 52178957Ssam#define SVR4_SEGV_MAPERR 1 53116742Ssam#define SVR4_SEGV_ACCERR 2 54144618Ssam 55144618Ssam#define SVR4_BUS_ADRALN 1 56178354Ssam#define SVR4_BUS_ADRERR 2 57178354Ssam#define SVR4_BUS_OBJERR 3 58116742Ssam 59178354Ssam#define SVR4_TRAP_BRKPT 1 60178354Ssam#define SVR4_TRAP_TRACE 2 61193655Ssam 62178354Ssam#define SVR4_POLL_IN 1 63178354Ssam#define SVR4_POLL_OUT 2 64220445Sadrian#define SVR4_POLL_MSG 3 65220445Sadrian#define SVR4_POLL_ERR 4 66220445Sadrian#define SVR4_POLL_PRI 5 67220445Sadrian 68220445Sadrian#define SVR4_CLD_EXITED 1 69220445Sadrian#define SVR4_CLD_KILLED 2 70220445Sadrian#define SVR4_CLD_DUMPED 3 71220445Sadrian#define SVR4_CLD_TRAPPED 4 72220445Sadrian#define SVR4_CLD_STOPPED 5 73220445Sadrian#define SVR4_CLD_CONTINUED 6 74220445Sadrian 75220445Sadrian#define SVR4_EMT_TAGOVF 1 76220445Sadrian 77220445Sadriantypedef union svr4_siginfo { 78220445Sadrian char si_pad[128]; /* Total size; for future expansion */ 79220445Sadrian struct { 80220445Sadrian int _signo; 81220445Sadrian int _code; 82220445Sadrian int _errno; 83220445Sadrian union { 84220445Sadrian struct { 85192468Ssam svr4_pid_t _pid; 86192468Ssam svr4_clock_t _utime; 87192468Ssam int _status; 88220445Sadrian svr4_clock_t _stime; 89220445Sadrian } _child; 90220445Sadrian 91220445Sadrian struct { 92220445Sadrian caddr_t _addr; 93220445Sadrian int _trap; 94184287Ssam } _fault; 95184282Ssam } _reason; 96184282Ssam } _info; 97160690Ssam} svr4_siginfo_t; 98160690Ssam 99160690Ssam#define si_signo _info._signo 100191148Skmacy#define si_code _info._code 101248069Sadrian#define si_errno _info._errno 102248069Sadrian 103195618Srpaulo#define si_pid _info._reason._child._pid 104195618Srpaulo#define si_stime _info._reason._child._stime 105195618Srpaulo#define si_status _info._reason._child._status 106248069Sadrian#define si_utime _info._reason._child._utime 107148301Ssam 108178354Ssam#define si_addr _info._reason._fault._addr 109190391Ssam#define si_trap _info._reason._fault._trap 110190579Ssam 111190579Ssam#endif /* !_SVR4_SIGINFO_H_ */ 112190579Ssam