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
6 * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
10 #define _ASM_SIGINFO_H
12 #include <linux/config.h>
14 #define SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int))
15 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE-SIGEV_HEAD_SIZE) / sizeof(int))
16 #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
18 #define HAVE_ARCH_SIGINFO_T
21 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
24 #define HAVE_ARCH_COPY_SIGINFO
28 * Careful to keep union _sifields from shifting ...
31 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
34 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
37 #include <asm-generic/siginfo.h>
39 typedef struct siginfo {
43 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
46 int _pad[SI_PAD_SIZE];
50 pid_t _pid; /* sender's pid */
51 __ARCH_SI_UID_T _uid; /* sender's uid */
56 timer_t _tid; /* timer id */
57 int _overrun; /* overrun count */
58 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
59 sigval_t _sigval; /* same as below */
60 int _sys_private; /* not to be passed to user */
63 /* POSIX.1b signals */
65 pid_t _pid; /* sender's pid */
66 __ARCH_SI_UID_T _uid; /* sender's uid */
72 pid_t _pid; /* which child */
73 __ARCH_SI_UID_T _uid; /* sender's uid */
74 int _status; /* exit code */
81 pid_t _pid; /* which child */
83 int _status; /* exit code */
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
89 void __user *_addr; /* faulting insn/memory ref. */
90 #ifdef __ARCH_SI_TRAPNO
91 int _trapno; /* TRAP # which caused the signal */
95 /* SIGPOLL, SIGXFSZ (To do ...) */
97 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
105 * Again these have been choosen to be IRIX compatible.
110 #define SI_ASYNCIO -2 /* sent by AIO completion */
111 #define SI_TIMER __SI_CODE(__SI_TIMER,-3) /* sent by timer expiration */
112 #define SI_MESGQ __SI_CODE(__SI_MESGQ,-4) /* sent by real time mesq state change */
117 * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
119 #include <linux/string.h>
121 static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
123 if (from->si_code < 0)
124 memcpy(to, from, sizeof(*to));
126 /* _sigchld is currently the largest know union member */
127 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
132 #endif /* _ASM_SIGINFO_H */