ibcs2_signal.h revision 330897
1/* $NetBSD: ibcs2_signal.h,v 1.7 1995/08/14 02:26:01 mycroft Exp $ */ 2 3/*- 4 * SPDX-License-Identifier: BSD-4-Clause 5 * 6 * Copyright (c) 1994, 1995 Scott Bartram 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. All advertising materials mentioning features or use of this software 18 * must display the following acknowledgement: 19 * This product includes software developed by Scott Bartram. 20 * 4. The name of the author may not be used to endorse or promote products 21 * derived from this software without specific prior written permission 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * 34 * $FreeBSD: stable/11/sys/i386/ibcs2/ibcs2_signal.h 330897 2018-03-14 03:19:51Z eadler $ 35 */ 36 37#ifndef _IBCS2_SIGNAL_H 38#define _IBCS2_SIGNAL_H 39 40#define IBCS2_SIGHUP 1 41#define IBCS2_SIGINT 2 42#define IBCS2_SIGQUIT 3 43#define IBCS2_SIGILL 4 44#define IBCS2_SIGTRAP 5 45#define IBCS2_SIGIOT 6 46#define IBCS2_SIGABRT 6 47#define IBCS2_SIGEMT 7 48#define IBCS2_SIGFPE 8 49#define IBCS2_SIGKILL 9 50#define IBCS2_SIGBUS 10 51#define IBCS2_SIGSEGV 11 52#define IBCS2_SIGSYS 12 53#define IBCS2_SIGPIPE 13 54#define IBCS2_SIGALRM 14 55#define IBCS2_SIGTERM 15 56#define IBCS2_SIGUSR1 16 57#define IBCS2_SIGUSR2 17 58#define IBCS2_SIGCLD 18 59#define IBCS2_SIGPWR 19 60#define IBCS2_SIGWINCH 20 61#define IBCS2_SIGPOLL 22 62#define IBCS2_NSIG 32 63#define IBCS2_SIGTBLSZ 32 64 65/* 66 * SCO-specific 67 */ 68#define IBCS2_SIGSTOP 23 69#define IBCS2_SIGTSTP 24 70#define IBCS2_SIGCONT 25 71#define IBCS2_SIGTTIN 26 72#define IBCS2_SIGTTOU 27 73#define IBCS2_SIGVTALRM 28 74#define IBCS2_SIGPROF 29 75 76#define IBCS2_SIGNO_MASK 0x00FF 77#define IBCS2_SIGNAL_MASK 0x0000 78#define IBCS2_SIGSET_MASK 0x0100 79#define IBCS2_SIGHOLD_MASK 0x0200 80#define IBCS2_SIGRELSE_MASK 0x0400 81#define IBCS2_SIGIGNORE_MASK 0x0800 82#define IBCS2_SIGPAUSE_MASK 0x1000 83 84#define IBCS2_SIGNO(x) ((x) & IBCS2_SIGNO_MASK) 85#define IBCS2_SIGCALL(x) ((x) & ~IBCS2_SIGNO_MASK) 86 87typedef long ibcs2_sigset_t; 88typedef void (*ibcs2_sig_t)(int); 89 90struct ibcs2_sigaction { 91 ibcs2_sig_t isa_handler; 92 ibcs2_sigset_t isa_mask; 93 int isa_flags; 94}; 95 96#define IBCS2_SIG_DFL ((ibcs2_sig_t)0) 97#define IBCS2_SIG_ERR ((ibcs2_sig_t)-1) 98#define IBCS2_SIG_IGN ((ibcs2_sig_t)1) 99#define IBCS2_SIG_HOLD ((ibcs2_sig_t)2) 100 101#define IBCS2_SIG_SETMASK 0 102#define IBCS2_SIG_BLOCK 1 103#define IBCS2_SIG_UNBLOCK 2 104 105/* sa_flags */ 106#define IBCS2_SA_NOCLDSTOP 1 107 108#define IBCS2_MINSIGSTKSZ 8192 109 110extern int bsd_to_ibcs2_sig[]; 111 112#endif /* _IBCS2_SIGNAL_H */ 113