1/*	$NetBSD: linux32_siginfo.h,v 1.2 2021/09/19 22:30:28 thorpej Exp $	*/
2
3/*-
4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Eric Haszlakiewicz.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef _AMD64_LINUX32_SIGINFO_H
33#define _AMD64_LINUX32_SIGINFO_H
34
35#include <compat/linux32/common/linux32_sigevent.h>
36
37#define SI_MAX_SIZE	128
38#define SI_PAD_SIZE	((SI_MAX_SIZE/sizeof(int)) - 3)
39
40typedef struct linux32_siginfo {
41	int	lsi_signo;
42	int	lsi_errno;
43	int	lsi_code;
44	union {
45		int _pad[SI_PAD_SIZE];
46
47		/* kill() */
48		struct {
49			linux32_pid_t	_pid;
50			linux32_uid_t	_uid;
51		} _kill;
52
53		/* POSIX.1b signals */
54		struct {
55			linux32_pid_t	_pid;
56			linux32_uid_t	_uid;
57			linux32_sigval_t	_sigval;
58		} _rt;
59
60		/* POSIX.1b timers */
61		struct {
62			unsigned int	_timer1;
63			unsigned int	_timer2;
64		} _timer;
65
66		/* SIGCHLD */
67		struct {
68			linux32_pid_t	_pid;
69			linux32_uid_t	_uid;
70			int		_status;
71			linux32_clock_t	_utime;
72			linux32_clock_t	_stime;
73		} _sigchld;
74
75		/* SIGPOLL */
76		struct {
77			int _band;
78			int _fd;
79		} _sigpoll;
80
81		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
82		struct {
83			netbsd32_voidp _addr;
84		} _sigfault;
85	} _sidata;
86} linux32_siginfo_t;
87
88#endif /* !_AMD64_LINUX32_SIGINFO_H */
89