linux_siginfo.h revision 1.1
11.1Serh/* $NetBSD: linux_siginfo.h,v 1.1 1998/09/30 21:36:27 erh 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 * 3. All advertising materials mentioning features or use of this software 191.1Serh * must display the following acknowledgement: 201.1Serh * This product includes software developed by the NetBSD 211.1Serh * Foundation, Inc. and its contributors. 221.1Serh * 4. Neither the name of The NetBSD Foundation nor the names of its 231.1Serh * contributors may be used to endorse or promote products derived 241.1Serh * from this software without specific prior written permission. 251.1Serh * 261.1Serh * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.1Serh * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.1Serh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.1Serh * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.1Serh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.1Serh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.1Serh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.1Serh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.1Serh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.1Serh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.1Serh * POSSIBILITY OF SUCH DAMAGE. 371.1Serh */ 381.1Serh 391.1Serh#ifndef _ALPHA_LINUX_SIGINFO_H 401.1Serh#define _ALPHA_LINUX_SIGINFO_H 411.1Serh 421.1Serhtypedef union linux_sigval { 431.1Serh int sival_int; 441.1Serh void *sival_ptr; 451.1Serh} linux_sigval_t; 461.1Serh 471.1Serh#define SI_MAX_SIZE 128 481.1Serh#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4) 491.1Serh 501.1Serhtypedef struct linux_siginfo { 511.1Serh int si_signo; 521.1Serh int si_errno; 531.1Serh int si_code; 541.1Serh union { 551.1Serh int _pad[SI_PAD_SIZE]; 561.1Serh 571.1Serh /* kill() */ 581.1Serh struct { 591.1Serh linux_pid_t _pid; 601.1Serh linux_uid_t _uid; 611.1Serh } _kill; 621.1Serh 631.1Serh /* POSIX.1b signals */ 641.1Serh struct { 651.1Serh linux_pid_t _pid; 661.1Serh linux_uid_t _uid; 671.1Serh linux_sigval_t _sigval; 681.1Serh } _rt; 691.1Serh 701.1Serh /* POSIX.1b timers */ 711.1Serh struct { 721.1Serh unsigned int _timer1; 731.1Serh unsigned int _timer2; 741.1Serh } _timer; 751.1Serh 761.1Serh /* SIGCHLD */ 771.1Serh struct { 781.1Serh linux_pid_t _pid; 791.1Serh int _status; 801.1Serh linux_clock_t _utime; 811.1Serh linux_clock_t _stime; 821.1Serh } _sigchld; 831.1Serh 841.1Serh /* SIGPOLL */ 851.1Serh struct { 861.1Serh int _band; 871.1Serh int _fd; 881.1Serh } _sigpoll; 891.1Serh 901.1Serh /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ 911.1Serh struct { 921.1Serh void *_addr; 931.1Serh } _sigfault; 941.1Serh } _sidata; 951.1Serh} linux_siginfo_t; 961.1Serh 971.1Serh#define si_pid _sidata._kill._pid 981.1Serh#define si_uid _sidata._kill._uid 991.1Serh 1001.1Serh#define LINUX_SI_USER 0 1011.1Serh#define LINUX_SI_KERNEL 0x80 1021.1Serh#define LINUX_SI_QUEUE -1 1031.1Serh#define LINUX_SI_TIMER -2 1041.1Serh#define LINUX_SI_MESGQ -3 1051.1Serh#define LINUX_SI_ASYNCIO -4 1061.1Serh 1071.1Serh#define LINUX_SI_FROMUSER(sp) ((sp)->si_code <= 0) 1081.1Serh#define LINUX_SI_FROMKERENL(sp) ((sp)->si_code > 0) 1091.1Serh 1101.1Serh 1111.1Serh#endif /* !_ALPHA_LINUX_SIGINFO_H */ 112