freebsd32_signal.h revision 209687
1184610Salfred/*- 2184610Salfred * Copyright (c) 2006 David Xu <davidxu@freebsd.org> 3184610Salfred * All rights reserved. 4184610Salfred * 5184610Salfred * Redistribution and use in source and binary forms, with or without 6184610Salfred * modification, are permitted provided that the following conditions 7184610Salfred * are met: 8184610Salfred * 1. Redistributions of source code must retain the above copyright 9184610Salfred * notice, this list of conditions and the following disclaimer. 10184610Salfred * 2. Redistributions in binary form must reproduce the above copyright 11184610Salfred * notice, this list of conditions and the following disclaimer in the 12184610Salfred * documentation and/or other materials provided with the distribution. 13184610Salfred * 14184610Salfred * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15184610Salfred * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16184610Salfred * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17184610Salfred * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18184610Salfred * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19184610Salfred * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20184610Salfred * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21184610Salfred * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22184610Salfred * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23184610Salfred * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24184610Salfred * SUCH DAMAGE. 25184610Salfred * 26184610Salfred * $FreeBSD: head/sys/compat/freebsd32/freebsd32_signal.h 209687 2010-07-04 11:43:53Z kib $ 27184610Salfred */ 28184610Salfred 29184610Salfred#ifndef _COMPAT_FREEBSD32_SIGNAL_H_ 30184610Salfred#define _COMPAT_FREEBSD32_SIGNAL_H_ 31184610Salfred 32184610Salfredstruct sigaltstack32 { 33184610Salfred u_int32_t ss_sp; /* signal stack base */ 34184610Salfred u_int32_t ss_size; /* signal stack length */ 35184610Salfred int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ 36184610Salfred}; 37184610Salfred 38184610Salfredunion sigval32 { 39184610Salfred int sival_int; 40184610Salfred u_int32_t sival_ptr; 41184610Salfred /* 6.0 compatibility */ 42184610Salfred int sigval_int; 43184610Salfred u_int32_t sigval_ptr; 44184610Salfred}; 45184610Salfred 46184610Salfredstruct siginfo32 { 47184610Salfred int si_signo; /* signal number */ 48194677Sthompsa int si_errno; /* errno association */ 49194677Sthompsa int si_code; /* signal code */ 50194677Sthompsa int32_t si_pid; /* sending process */ 51194677Sthompsa u_int32_t si_uid; /* sender's ruid */ 52194677Sthompsa int si_status; /* exit value */ 53194677Sthompsa u_int32_t si_addr; /* faulting instruction */ 54194677Sthompsa union sigval32 si_value; /* signal value */ 55194677Sthompsa union { 56194677Sthompsa struct { 57194677Sthompsa int _trapno;/* machine specific trap code */ 58194677Sthompsa } _fault; 59194677Sthompsa struct { 60194677Sthompsa int _timerid; 61194677Sthompsa int _overrun; 62194677Sthompsa } _timer; 63194677Sthompsa struct { 64194677Sthompsa int _mqd; 65194677Sthompsa } _mesgq; 66194677Sthompsa struct { 67188942Sthompsa int _band; /* band event for SIGPOLL */ 68194677Sthompsa } _poll; /* was this ever used ? */ 69184610Salfred struct { 70188942Sthompsa int __spare1__; 71188942Sthompsa int __spare2__[7]; 72188942Sthompsa } __spare__; 73188942Sthompsa } _reason; 74184610Salfred}; 75188942Sthompsa 76188942Sthompsastruct osigevent32 { 77188942Sthompsa int sigev_notify; /* Notification type */ 78188942Sthompsa union { 79198151Sthompsa int __sigev_signo; /* Signal number */ 80228483Shselasky int __sigev_notify_kqueue; 81184610Salfred } __sigev_u; 82184610Salfred union sigval32 sigev_value; /* Signal value */ 83184610Salfred}; 84184610Salfred 85184610Salfredstruct sigevent32 { 86184610Salfred int sigev_notify; /* Notification type */ 87184610Salfred int sigev_signo; /* Signal number */ 88184610Salfred union sigval32 sigev_value; /* Signal value */ 89184610Salfred union { 90184610Salfred __lwpid_t _threadid; 91184610Salfred struct { 92184610Salfred uint32_t _function; 93184610Salfred uint32_t _attribute; 94184610Salfred } _sigev_thread; 95184610Salfred uint32_t __spare__[8]; 96184610Salfred } _sigev_un; 97184610Salfred}; 98184610Salfred 99228483Shselaskyvoid siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst); 100184610Salfred 101184610Salfred#endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ 102184610Salfred