[POWERPC] macintosh: Replace deprecated __initcall with device_initcall
[linux-2.6/zen-sources.git] / include / asm-ia64 / siginfo.h
blob9294e4b0c8bc395fb17b525c132ebd593053ef70
1 #ifndef _ASM_IA64_SIGINFO_H
2 #define _ASM_IA64_SIGINFO_H
4 /*
5 * Based on <asm-i386/siginfo.h>.
7 * Modified 1998-2002
8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
9 */
11 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
13 #define HAVE_ARCH_SIGINFO_T
14 #define HAVE_ARCH_COPY_SIGINFO
15 #define HAVE_ARCH_COPY_SIGINFO_TO_USER
17 #include <asm-generic/siginfo.h>
19 typedef struct siginfo {
20 int si_signo;
21 int si_errno;
22 int si_code;
23 int __pad0;
25 union {
26 int _pad[SI_PAD_SIZE];
28 /* kill() */
29 struct {
30 pid_t _pid; /* sender's pid */
31 uid_t _uid; /* sender's uid */
32 } _kill;
34 /* POSIX.1b timers */
35 struct {
36 timer_t _tid; /* timer id */
37 int _overrun; /* overrun count */
38 char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)];
39 sigval_t _sigval; /* must overlay ._rt._sigval! */
40 int _sys_private; /* not to be passed to user */
41 } _timer;
43 /* POSIX.1b signals */
44 struct {
45 pid_t _pid; /* sender's pid */
46 uid_t _uid; /* sender's uid */
47 sigval_t _sigval;
48 } _rt;
50 /* SIGCHLD */
51 struct {
52 pid_t _pid; /* which child */
53 uid_t _uid; /* sender's uid */
54 int _status; /* exit code */
55 clock_t _utime;
56 clock_t _stime;
57 } _sigchld;
59 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
60 struct {
61 void __user *_addr; /* faulting insn/memory ref. */
62 int _imm; /* immediate value for "break" */
63 unsigned int _flags; /* see below */
64 unsigned long _isr; /* isr */
65 } _sigfault;
67 /* SIGPOLL */
68 struct {
69 long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */
70 int _fd;
71 } _sigpoll;
72 } _sifields;
73 } siginfo_t;
75 #define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */
76 #define si_flags _sifields._sigfault._flags
78 * si_isr is valid for SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP provided that
79 * si_code is non-zero and __ISR_VALID is set in si_flags.
81 #define si_isr _sifields._sigfault._isr
84 * Flag values for si_flags:
86 #define __ISR_VALID_BIT 0
87 #define __ISR_VALID (1 << __ISR_VALID_BIT)
90 * SIGILL si_codes
92 #define ILL_BADIADDR (__SI_FAULT|9) /* unimplemented instruction address */
93 #define __ILL_BREAK (__SI_FAULT|10) /* illegal break */
94 #define __ILL_BNDMOD (__SI_FAULT|11) /* bundle-update (modification) in progress */
95 #undef NSIGILL
96 #define NSIGILL 11
99 * SIGFPE si_codes
101 #define __FPE_DECOVF (__SI_FAULT|9) /* decimal overflow */
102 #define __FPE_DECDIV (__SI_FAULT|10) /* decimal division by zero */
103 #define __FPE_DECERR (__SI_FAULT|11) /* packed decimal error */
104 #define __FPE_INVASC (__SI_FAULT|12) /* invalid ASCII digit */
105 #define __FPE_INVDEC (__SI_FAULT|13) /* invalid decimal digit */
106 #undef NSIGFPE
107 #define NSIGFPE 13
110 * SIGSEGV si_codes
112 #define __SEGV_PSTKOVF (__SI_FAULT|3) /* paragraph stack overflow */
113 #undef NSIGSEGV
114 #define NSIGSEGV 3
117 * SIGTRAP si_codes
119 #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */
120 #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint or watchpoint */
121 #undef NSIGTRAP
122 #define NSIGTRAP 4
124 #ifdef __KERNEL__
125 #include <linux/string.h>
127 static inline void
128 copy_siginfo (siginfo_t *to, siginfo_t *from)
130 if (from->si_code < 0)
131 memcpy(to, from, sizeof(siginfo_t));
132 else
133 /* _sigchld is currently the largest know union member */
134 memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld));
137 #endif /* __KERNEL__ */
139 #endif /* _ASM_IA64_SIGINFO_H */