linux_siginfo.h revision 1.6
11.6Snjoly/*	$NetBSD: linux_siginfo.h,v 1.6 2009/06/08 11:46:06 njoly Exp $	*/
21.1Serh
31.1Serh/*-
41.1Serh * Copyright (c) 1998 The NetBSD Foundation, Inc.
51.1Serh * All rights reserved.
61.1Serh *
71.1Serh * This code is derived from software contributed to The NetBSD Foundation
81.1Serh * by Eric Haszlakiewicz.
91.1Serh *
101.1Serh * Redistribution and use in source and binary forms, with or without
111.1Serh * modification, are permitted provided that the following conditions
121.1Serh * are met:
131.1Serh * 1. Redistributions of source code must retain the above copyright
141.1Serh *    notice, this list of conditions and the following disclaimer.
151.1Serh * 2. Redistributions in binary form must reproduce the above copyright
161.1Serh *    notice, this list of conditions and the following disclaimer in the
171.1Serh *    documentation and/or other materials provided with the distribution.
181.1Serh *
191.1Serh * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Serh * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Serh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Serh * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Serh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Serh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Serh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Serh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Serh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Serh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Serh * POSSIBILITY OF SUCH DAMAGE.
301.1Serh */
311.1Serh
321.1Serh#ifndef _ALPHA_LINUX_SIGINFO_H
331.1Serh#define _ALPHA_LINUX_SIGINFO_H
341.1Serh
351.1Serhtypedef union linux_sigval {
361.1Serh	int	sival_int;
371.1Serh	void	*sival_ptr;
381.1Serh} linux_sigval_t;
391.1Serh
401.1Serh#define SI_MAX_SIZE	128
411.1Serh#define SI_PAD_SIZE	((SI_MAX_SIZE/sizeof(int)) - 4)
421.1Serh
431.1Serhtypedef struct linux_siginfo {
441.3Serh	int	lsi_signo;
451.3Serh	int	lsi_errno;
461.3Serh	int	lsi_code;
471.1Serh	union {
481.1Serh		int _pad[SI_PAD_SIZE];
491.1Serh
501.1Serh		/* kill() */
511.1Serh		struct {
521.1Serh			linux_pid_t	_pid;
531.1Serh			linux_uid_t	_uid;
541.1Serh		} _kill;
551.1Serh
561.1Serh		/* POSIX.1b signals */
571.1Serh		struct {
581.1Serh			linux_pid_t	_pid;
591.1Serh			linux_uid_t	_uid;
601.1Serh			linux_sigval_t	_sigval;
611.1Serh		} _rt;
621.1Serh
631.1Serh		/* POSIX.1b timers */
641.1Serh		struct {
651.1Serh			unsigned int	_timer1;
661.1Serh			unsigned int	_timer2;
671.1Serh		} _timer;
681.1Serh
691.1Serh		/* SIGCHLD */
701.1Serh		struct {
711.1Serh			linux_pid_t	_pid;
721.6Snjoly			linux_uid_t	_uid;
731.1Serh			int		_status;
741.1Serh			linux_clock_t	_utime;
751.1Serh			linux_clock_t	_stime;
761.1Serh		} _sigchld;
771.1Serh
781.1Serh		/* SIGPOLL */
791.1Serh		struct {
801.1Serh			int _band;
811.1Serh			int _fd;
821.1Serh		} _sigpoll;
831.1Serh
841.1Serh		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
851.1Serh		struct {
861.1Serh			void *_addr;
871.1Serh		} _sigfault;
881.1Serh	} _sidata;
891.1Serh} linux_siginfo_t;
901.1Serh
911.2Serh#define lsi_pid		_sidata._kill._pid
921.2Serh#define lsi_uid		_sidata._kill._uid
931.1Serh
941.1Serh#endif /* !_ALPHA_LINUX_SIGINFO_H */
95