-/*
- * Incase of SIGILL and SIGFPE, si_addr contains the address of
- * faulting instruction.
- * Incase of SIGSEGV and SIGBUS, si_addr contains address of
- * faulting memory reference.
- * Incase of SIGCHLD, si_pid willhave child process ID,
- * si_status will contain exit value or signal.
- * si_uid contains real user ID of the process that sent the signal
+#ifdef BSD_KERNEL_PRIVATE
+
+typedef struct user_siginfo {
+ int si_signo; /* signal number */
+ int si_errno; /* errno association */
+ int si_code; /* signal code */
+ pid_t si_pid; /* sending process */
+ uid_t si_uid; /* sender's ruid */
+ int si_status; /* exit value */
+ user_addr_t si_addr; /* faulting instruction (see below) */
+ union user_sigval si_value; /* signal value */
+ user_long_t si_band; /* band event for SIGPOLL */
+ user_ulong_t pad[7]; /* Reserved for Future Use */
+} user_siginfo_t;
+
+typedef struct user64_siginfo {
+ int si_signo; /* signal number */
+ int si_errno; /* errno association */
+ int si_code; /* signal code */
+ pid_t si_pid; /* sending process */
+ uid_t si_uid; /* sender's ruid */
+ int si_status; /* exit value */
+ user64_addr_t si_addr; /* faulting instruction (see below) */
+ union user64_sigval si_value; /* signal value */
+ user64_long_t si_band; /* band event for SIGPOLL */
+ user64_ulong_t __pad[7]; /* Reserved for Future Use */
+} user64_siginfo_t;
+
+typedef struct user32_siginfo {
+ int si_signo; /* signal number */
+ int si_errno; /* errno association */
+ int si_code; /* signal code */
+ pid_t si_pid; /* sending process */
+ uid_t si_uid; /* sender's ruid */
+ int si_status; /* exit value */
+ user32_addr_t si_addr; /* faulting instruction (see below) */
+ union user32_sigval si_value; /* signal value */
+ user32_long_t si_band; /* band event for SIGPOLL */
+ user32_ulong_t __pad[7]; /* Reserved for Future Use */
+} user32_siginfo_t;
+
+void siginfo_user_to_user32(user_siginfo_t *, user32_siginfo_t *);
+void siginfo_user_to_user64(user_siginfo_t *, user64_siginfo_t *);
+
+#endif /* BSD_KERNEL_PRIVATE */
+
+/*
+ * When the signal is SIGILL or SIGFPE, si_addr contains the address of
+ * the faulting instruction.
+ * When the signal is SIGSEGV or SIGBUS, si_addr contains the address of
+ * the faulting memory reference. Although for x86 there are cases of SIGSEGV
+ * for which si_addr cannot be determined and is NULL.
+ * If the signal is SIGCHLD, the si_pid field will contain the child process ID,
+ * si_status contains the exit value or signal and
+ * si_uid contains the real user ID of the process that sent the signal.