xref: /netbsd-src/sys/compat/linux/arch/m68k/linux_siginfo.h (revision f72d02ff7090253c58f9b270afe74f16a767892a)
1*f72d02ffSchristos /*	$NetBSD: linux_siginfo.h,v 1.6 2011/11/18 04:07:44 christos Exp $	*/
20176ca73Sitohy 
30176ca73Sitohy /*-
40176ca73Sitohy  * Copyright (c) 1998 The NetBSD Foundation, Inc.
50176ca73Sitohy  * All rights reserved.
60176ca73Sitohy  *
70176ca73Sitohy  * This code is derived from software contributed to The NetBSD Foundation
80176ca73Sitohy  * by Eric Haszlakiewicz.
90176ca73Sitohy  *
100176ca73Sitohy  * Redistribution and use in source and binary forms, with or without
110176ca73Sitohy  * modification, are permitted provided that the following conditions
120176ca73Sitohy  * are met:
130176ca73Sitohy  * 1. Redistributions of source code must retain the above copyright
140176ca73Sitohy  *    notice, this list of conditions and the following disclaimer.
150176ca73Sitohy  * 2. Redistributions in binary form must reproduce the above copyright
160176ca73Sitohy  *    notice, this list of conditions and the following disclaimer in the
170176ca73Sitohy  *    documentation and/or other materials provided with the distribution.
180176ca73Sitohy  *
190176ca73Sitohy  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
200176ca73Sitohy  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
210176ca73Sitohy  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
220176ca73Sitohy  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
230176ca73Sitohy  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
240176ca73Sitohy  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
250176ca73Sitohy  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
260176ca73Sitohy  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
270176ca73Sitohy  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
280176ca73Sitohy  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
290176ca73Sitohy  * POSSIBILITY OF SUCH DAMAGE.
300176ca73Sitohy  */
310176ca73Sitohy 
320176ca73Sitohy #ifndef _M68K_LINUX_SIGINFO_H
330176ca73Sitohy #define _M68K_LINUX_SIGINFO_H
340176ca73Sitohy 
350176ca73Sitohy typedef union linux_sigval {
360176ca73Sitohy 	int	sival_int;
370176ca73Sitohy 	void	*sival_ptr;
380176ca73Sitohy } linux_sigval_t;
390176ca73Sitohy 
400176ca73Sitohy #define SI_MAX_SIZE	128
410176ca73Sitohy #define SI_PAD_SIZE	((SI_MAX_SIZE/sizeof(int)) - 3)
420176ca73Sitohy 
430176ca73Sitohy typedef struct linux_siginfo {
44866ad0f7Schristos 	int	lsi_signo;
45866ad0f7Schristos 	int	lsi_errno;
46866ad0f7Schristos 	int	lsi_code;
470176ca73Sitohy 	union {
480176ca73Sitohy 		int _pad[SI_PAD_SIZE];
490176ca73Sitohy 
500176ca73Sitohy 		/* kill() */
510176ca73Sitohy 		struct {
520176ca73Sitohy 			linux_pid_t	_pid;
530176ca73Sitohy 			linux_uid_t	_uid;
540176ca73Sitohy 		} _kill;
550176ca73Sitohy 
560176ca73Sitohy 		/* POSIX.1b signals */
570176ca73Sitohy 		struct {
580176ca73Sitohy 			linux_pid_t	_pid;
590176ca73Sitohy 			linux_uid_t	_uid;
600176ca73Sitohy 			linux_sigval_t	_sigval;
610176ca73Sitohy 		} _rt;
620176ca73Sitohy 
630176ca73Sitohy 		/* POSIX.1b timers */
640176ca73Sitohy 		struct {
650176ca73Sitohy 			unsigned int	_timer1;
660176ca73Sitohy 			unsigned int	_timer2;
670176ca73Sitohy 		} _timer;
680176ca73Sitohy 
690176ca73Sitohy 		/* SIGCHLD */
700176ca73Sitohy 		struct {
710176ca73Sitohy 			linux_pid_t	_pid;
720176ca73Sitohy 			linux_uid_t	_uid;
730176ca73Sitohy 			int		_status;
740176ca73Sitohy 			linux_clock_t	_utime;
750176ca73Sitohy 			linux_clock_t	_stime;
760176ca73Sitohy 		} _sigchld;
770176ca73Sitohy 
780176ca73Sitohy 		/* SIGPOLL */
790176ca73Sitohy 		struct {
800176ca73Sitohy 			int _band;
810176ca73Sitohy 			int _fd;
820176ca73Sitohy 		} _sigpoll;
830176ca73Sitohy 
840176ca73Sitohy 		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
850176ca73Sitohy 		struct {
860176ca73Sitohy 			void *_addr;
870176ca73Sitohy 		} _sigfault;
880176ca73Sitohy 	} _sidata;
890176ca73Sitohy } linux_siginfo_t;
900176ca73Sitohy 
910176ca73Sitohy #endif /* !_M68K_LINUX_SIGINFO_H */
92