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 __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 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
23 #define HAVE_ARCH_COPY_SIGINFO
27 * Careful to keep union _sifields from shifting ...
30 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
33 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
36 #include <asm-generic/siginfo.h>
38 typedef struct siginfo {
42 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
45 int _pad[SI_PAD_SIZE];
49 pid_t _pid; /* sender's pid */
50 __ARCH_SI_UID_T _uid; /* sender's uid */
55 timer_t _tid; /* timer id */
56 int _overrun; /* overrun count */
57 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
58 sigval_t _sigval; /* same as below */
59 int _sys_private; /* not to be passed to user */
62 /* POSIX.1b signals */
64 pid_t _pid; /* sender's pid */
65 __ARCH_SI_UID_T _uid; /* sender's uid */
71 pid_t _pid; /* which child */
72 __ARCH_SI_UID_T _uid; /* sender's uid */
73 int _status; /* exit code */
80 pid_t _pid; /* which child */
82 int _status; /* exit code */
86 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
88 void __user *_addr; /* faulting insn/memory ref. */
89 #ifdef __ARCH_SI_TRAPNO
90 int _trapno; /* TRAP # which caused the signal */
94 /* SIGPOLL, SIGXFSZ (To do ...) */
96 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
104 * Again these have been choosen to be IRIX compatible.
109 #define SI_ASYNCIO -2 /* sent by AIO completion */
110 #define SI_TIMER __SI_CODE(__SI_TIMER,-3) /* sent by timer expiration */
111 #define SI_MESGQ __SI_CODE(__SI_MESGQ,-4) /* sent by real time mesq state change */
116 * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
118 #include <linux/string.h>
120 static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
122 if (from->si_code < 0)
123 memcpy(to, from, sizeof(*to));
125 /* _sigchld is currently the largest know union member */
126 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
131 #endif /* _ASM_SIGINFO_H */