1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _ASM_GENERIC_SIGINFO_H
13 #define _ASM_GENERIC_SIGINFO_H
15 #include <linux/compiler.h>
16 #include <linux/types.h>
18 typedef union sigval {
20 void __user *sival_ptr;
23 #ifndef __ARCH_SI_PREAMBLE_SIZE
24 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
27 #define SI_MAX_SIZE 128
29 #define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
32 #ifndef __ARCH_SI_UID_T
33 #define __ARCH_SI_UID_T uid_t
36 #ifndef __ARCH_SI_BAND_T
37 #define __ARCH_SI_BAND_T long
40 #ifndef HAVE_ARCH_SIGINFO_T
42 typedef struct siginfo {
48 int _pad[SI_PAD_SIZE];
58 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
79 #ifdef __ARCH_SI_TRAPNO
85 __ARCH_SI_BAND_T _band;
93 #define si_pid _sifields._kill._pid
94 #define si_uid _sifields._kill._uid
95 #define si_tid _sifields._timer._tid
96 #define si_overrun _sifields._timer._overrun
97 #define si_sys_private _sifields._timer._sys_private
98 #define si_status _sifields._sigchld._status
99 #define si_utime _sifields._sigchld._utime
100 #define si_stime _sifields._sigchld._stime
101 #define si_value _sifields._rt._sigval
102 #define si_int _sifields._rt._sigval.sival_int
103 #define si_ptr _sifields._rt._sigval.sival_ptr
104 #define si_addr _sifields._sigfault._addr
105 #ifdef __ARCH_SI_TRAPNO
106 #define si_trapno _sifields._sigfault._trapno
108 #define si_band _sifields._sigpoll._band
109 #define si_fd _sifields._sigpoll._fd
118 #define __SI_CODE(T,N) (N)
121 #define SI_KERNEL 0x80
123 #define SI_TIMER __SI_CODE(__SI_TIMER,-2)
124 #define SI_MESGQ __SI_CODE(__SI_MESGQ,-3)
125 #define SI_ASYNCIO -4
128 #define SI_DETHREAD -7
130 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
131 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
133 #define ILL_ILLOPC (__SI_FAULT|1)
134 #define ILL_ILLOPN (__SI_FAULT|2)
135 #define ILL_ILLADR (__SI_FAULT|3)
136 #define ILL_ILLTRP (__SI_FAULT|4)
137 #define ILL_PRVOPC (__SI_FAULT|5)
138 #define ILL_PRVREG (__SI_FAULT|6)
139 #define ILL_COPROC (__SI_FAULT|7)
140 #define ILL_BADSTK (__SI_FAULT|8)
143 #define FPE_INTDIV (__SI_FAULT|1)
144 #define FPE_INTOVF (__SI_FAULT|2)
145 #define FPE_FLTDIV (__SI_FAULT|3)
146 #define FPE_FLTOVF (__SI_FAULT|4)
147 #define FPE_FLTUND (__SI_FAULT|5)
148 #define FPE_FLTRES (__SI_FAULT|6)
149 #define FPE_FLTINV (__SI_FAULT|7)
150 #define FPE_FLTSUB (__SI_FAULT|8)
153 #define SEGV_MAPERR (__SI_FAULT|1)
154 #define SEGV_ACCERR (__SI_FAULT|2)
157 #define BUS_ADRALN (__SI_FAULT|1)
158 #define BUS_ADRERR (__SI_FAULT|2)
159 #define BUS_OBJERR (__SI_FAULT|3)
162 #define TRAP_BRKPT (__SI_FAULT|1)
163 #define TRAP_TRACE (__SI_FAULT|2)
166 #define CLD_EXITED (__SI_CHLD|1)
167 #define CLD_KILLED (__SI_CHLD|2)
168 #define CLD_DUMPED (__SI_CHLD|3)
169 #define CLD_TRAPPED (__SI_CHLD|4)
170 #define CLD_STOPPED (__SI_CHLD|5)
171 #define CLD_CONTINUED (__SI_CHLD|6)
174 #define POLL_IN (__SI_POLL|1)
175 #define POLL_OUT (__SI_POLL|2)
176 #define POLL_MSG (__SI_POLL|3)
177 #define POLL_ERR (__SI_POLL|4)
178 #define POLL_PRI (__SI_POLL|5)
179 #define POLL_HUP (__SI_POLL|6)
182 #define SIGEV_SIGNAL 0
184 #define SIGEV_THREAD 2
185 #define SIGEV_THREAD_ID 4
187 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE
188 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
191 #define SIGEV_MAX_SIZE 64
192 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
194 typedef struct sigevent {
195 sigval_t sigev_value;
199 int _pad[SIGEV_PAD_SIZE];
203 void (*_function)(sigval_t);
209 #define sigev_notify_function _sigev_un._sigev_thread._function
210 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute
211 #define sigev_notify_thread_id _sigev_un._tid