1 #ifndef __siginfo_t_defined
2 #define __siginfo_t_defined 1
4 #include <bits/wordsize.h>
5 #include <bits/types.h>
6 #include <bits/types/__sigval_t.h>
8 #define __SI_MAX_SIZE 128
10 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
12 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
15 /* Some fields of siginfo_t have architecture-specific variations. */
16 #include <bits/siginfo-arch.h>
17 #ifndef __SI_ALIGNMENT
18 # define __SI_ALIGNMENT /* nothing */
20 #ifndef __SI_BAND_TYPE
21 # define __SI_BAND_TYPE long int
24 # define __SI_CLOCK_T __clock_t
26 #ifndef __SI_ERRNO_THEN_CODE
27 # define __SI_ERRNO_THEN_CODE 1
29 #ifndef __SI_HAVE_SIGSYS
30 # define __SI_HAVE_SIGSYS 1
32 #ifndef __SI_SIGFAULT_ADDL
33 # define __SI_SIGFAULT_ADDL /* nothing */
38 int si_signo
; /* Signal number. */
39 #if __SI_ERRNO_THEN_CODE
40 int si_errno
; /* If non-zero, an errno value associated with
41 this signal, as defined in <errno.h>. */
42 int si_code
; /* Signal code. */
48 int __pad0
; /* Explicit padding. */
53 int _pad
[__SI_PAD_SIZE
];
58 __pid_t si_pid
; /* Sending process ID. */
59 __uid_t si_uid
; /* Real user ID of sending process. */
62 /* POSIX.1b timers. */
65 int si_tid
; /* Timer ID. */
66 int si_overrun
; /* Overrun count. */
67 __sigval_t si_sigval
; /* Signal value. */
70 /* POSIX.1b signals. */
73 __pid_t si_pid
; /* Sending process ID. */
74 __uid_t si_uid
; /* Real user ID of sending process. */
75 __sigval_t si_sigval
; /* Signal value. */
81 __pid_t si_pid
; /* Which child. */
82 __uid_t si_uid
; /* Real user ID of sending process. */
83 int si_status
; /* Exit value or signal. */
84 __SI_CLOCK_T si_utime
;
85 __SI_CLOCK_T si_stime
;
88 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
91 void *si_addr
; /* Faulting insn/memory ref. */
93 short int si_addr_lsb
; /* Valid LSB of the reported address. */
96 /* used when si_code=SEGV_BNDERR */
102 /* used when si_code=SEGV_PKUERR */
110 long int si_band
; /* Band event for SIGPOLL. */
118 void *_call_addr
; /* Calling user insn. */
119 int _syscall
; /* Triggering system call number. */
120 unsigned int _arch
; /* AUDIT_ARCH_* of syscall. */
124 } siginfo_t __SI_ALIGNMENT
;
127 /* X/Open requires some more fields with fixed names. */
128 #define si_pid _sifields._kill.si_pid
129 #define si_uid _sifields._kill.si_uid
130 #define si_timerid _sifields._timer.si_tid
131 #define si_overrun _sifields._timer.si_overrun
132 #define si_status _sifields._sigchld.si_status
133 #define si_utime _sifields._sigchld.si_utime
134 #define si_stime _sifields._sigchld.si_stime
135 #define si_value _sifields._rt.si_sigval
136 #define si_int _sifields._rt.si_sigval.sival_int
137 #define si_ptr _sifields._rt.si_sigval.sival_ptr
138 #define si_addr _sifields._sigfault.si_addr
139 #define si_addr_lsb _sifields._sigfault.si_addr_lsb
140 #define si_lower _sifields._sigfault._bounds._addr_bnd._lower
141 #define si_upper _sifields._sigfault._bounds._addr_bnd._upper
142 #define si_pkey _sifields._sigfault._bounds._pkey
143 #define si_band _sifields._sigpoll.si_band
144 #define si_fd _sifields._sigpoll.si_fd
146 # define si_call_addr _sifields._sigsys._call_addr
147 # define si_syscall _sifields._sigsys._syscall
148 # define si_arch _sifields._sigsys._arch