| [2] | 1 | /* |
|---|
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
|---|
| 3 | * License. See the file "COPYING" in the main directory of this archive |
|---|
| 4 | * for more details. |
|---|
| 5 | * |
|---|
| 6 | * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle |
|---|
| 7 | * Copyright (C) 2000, 2001 Silicon Graphics, Inc. |
|---|
| 8 | */ |
|---|
| 9 | #ifndef _ASM_SIGINFO_H |
|---|
| 10 | #define _ASM_SIGINFO_H |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ |
|---|
| 14 | |
|---|
| 15 | #define HAVE_ARCH_SIGINFO_T |
|---|
| 16 | |
|---|
| 17 | /* |
|---|
| 18 | * We duplicate the generic versions - <linux/siginfo.h> is just borked |
|---|
| 19 | * by design ... |
|---|
| 20 | */ |
|---|
| 21 | #define HAVE_ARCH_COPY_SIGINFO |
|---|
| 22 | struct siginfo; |
|---|
| 23 | |
|---|
| 24 | /* |
|---|
| 25 | * Careful to keep union _sifields from shifting ... |
|---|
| 26 | */ |
|---|
| 27 | #ifndef __mips64 |
|---|
| 28 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
|---|
| 29 | #endif |
|---|
| 30 | #ifdef __mips64 |
|---|
| 31 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
|---|
| 32 | #endif |
|---|
| 33 | |
|---|
| 34 | #include <linux/siginfo.h> |
|---|
| 35 | |
|---|
| 36 | typedef struct siginfo { |
|---|
| 37 | int si_signo; |
|---|
| 38 | int si_code; |
|---|
| 39 | int si_errno; |
|---|
| 40 | int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; |
|---|
| 41 | |
|---|
| 42 | union { |
|---|
| 43 | int _pad[SI_PAD_SIZE]; |
|---|
| 44 | |
|---|
| 45 | /* kill() */ |
|---|
| 46 | struct { |
|---|
| 47 | pid_t _pid; /* sender's pid */ |
|---|
| 48 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
|---|
| 49 | } _kill; |
|---|
| 50 | |
|---|
| 51 | /* POSIX.1b timers */ |
|---|
| 52 | struct { |
|---|
| 53 | timer_t _tid; /* timer id */ |
|---|
| 54 | int _overrun; /* overrun count */ |
|---|
| 55 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; |
|---|
| 56 | sigval_t _sigval; /* same as below */ |
|---|
| 57 | int _sys_private; /* not to be passed to user */ |
|---|
| 58 | } _timer; |
|---|
| 59 | |
|---|
| 60 | /* POSIX.1b signals */ |
|---|
| 61 | struct { |
|---|
| 62 | pid_t _pid; /* sender's pid */ |
|---|
| 63 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
|---|
| 64 | sigval_t _sigval; |
|---|
| 65 | } _rt; |
|---|
| 66 | |
|---|
| 67 | /* SIGCHLD */ |
|---|
| 68 | struct { |
|---|
| 69 | pid_t _pid; /* which child */ |
|---|
| 70 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
|---|
| 71 | int _status; /* exit code */ |
|---|
| 72 | clock_t _utime; |
|---|
| 73 | clock_t _stime; |
|---|
| 74 | } _sigchld; |
|---|
| 75 | |
|---|
| 76 | /* IRIX SIGCHLD */ |
|---|
| 77 | struct { |
|---|
| 78 | pid_t _pid; /* which child */ |
|---|
| 79 | clock_t _utime; |
|---|
| 80 | int _status; /* exit code */ |
|---|
| 81 | clock_t _stime; |
|---|
| 82 | } _irix_sigchld; |
|---|
| 83 | |
|---|
| 84 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ |
|---|
| 85 | struct { |
|---|
| 86 | void *_addr; /* faulting insn/memory ref. */ |
|---|
| 87 | #ifdef __ARCH_SI_TRAPNO |
|---|
| 88 | int _trapno; /* TRAP # which caused the signal */ |
|---|
| 89 | #endif |
|---|
| 90 | } _sigfault; |
|---|
| 91 | |
|---|
| 92 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
|---|
| 93 | struct { |
|---|
| 94 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
|---|
| 95 | int _fd; |
|---|
| 96 | } _sigpoll; |
|---|
| 97 | } _sifields; |
|---|
| 98 | } siginfo_t; |
|---|
| 99 | |
|---|
| 100 | /* |
|---|
| 101 | * si_code values |
|---|
| 102 | * Again these have been choosen to be IRIX compatible. |
|---|
| 103 | */ |
|---|
| 104 | #undef SI_ASYNCIO |
|---|
| 105 | #undef SI_TIMER |
|---|
| 106 | #undef SI_MESGQ |
|---|
| 107 | #define SI_ASYNCIO -2 /* sent by AIO completion */ |
|---|
| 108 | #define SI_TIMER __SI_CODE(__SI_TIMER,-3) /* sent by timer expiration */ |
|---|
| 109 | #define SI_MESGQ __SI_CODE(__SI_MESGQ,-4) /* sent by real time mesq state change */ |
|---|
| 110 | |
|---|
| 111 | #endif /* _ASM_SIGINFO_H */ |
|---|