1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
8 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
10 #ifndef _UAPI_ASM_SIGINFO_H
11 #define _UAPI_ASM_SIGINFO_H
14 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int))
15 #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
17 #define HAVE_ARCH_SIGINFO_T
20 * Careful to keep union _sifields from shifting ...
22 #if _MIPS_SZLONG == 32
23 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
24 #elif _MIPS_SZLONG == 64
25 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
27 #error _MIPS_SZLONG neither 32 nor 64
32 #include <asm-generic/siginfo.h>
34 /* We can't use generic siginfo_t, because our si_code and si_errno are swapped */
35 typedef struct siginfo {
39 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
42 int _pad[SI_PAD_SIZE];
46 __kernel_pid_t _pid; /* sender's pid */
47 __ARCH_SI_UID_T _uid; /* sender's uid */
52 __kernel_timer_t _tid; /* timer id */
53 int _overrun; /* overrun count */
54 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
55 sigval_t _sigval; /* same as below */
56 int _sys_private; /* not to be passed to user */
59 /* POSIX.1b signals */
61 __kernel_pid_t _pid; /* sender's pid */
62 __ARCH_SI_UID_T _uid; /* sender's uid */
68 __kernel_pid_t _pid; /* which child */
69 __ARCH_SI_UID_T _uid; /* sender's uid */
70 int _status; /* exit code */
71 __kernel_clock_t _utime;
72 __kernel_clock_t _stime;
77 __kernel_pid_t _pid; /* which child */
78 __kernel_clock_t _utime;
79 int _status; /* exit code */
80 __kernel_clock_t _stime;
83 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
85 void __user *_addr; /* faulting insn/memory ref. */
86 #ifdef __ARCH_SI_TRAPNO
87 int _trapno; /* TRAP # which caused the signal */
91 /* used when si_code=SEGV_BNDERR */
96 /* used when si_code=SEGV_PKUERR */
101 /* SIGPOLL, SIGXFSZ (To do ...) */
103 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
109 void __user *_call_addr; /* calling user insn */
110 int _syscall; /* triggering system call number */
111 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
118 * Again these have been chosen to be IRIX compatible.
123 #define SI_ASYNCIO -2 /* sent by AIO completion */
124 #define SI_TIMER -3 /* sent by timer expiration */
125 #define SI_MESGQ -4 /* sent by real time mesq state change */
127 #endif /* _UAPI_ASM_SIGINFO_H */