ibcs2_signal.h revision 68520
155682Smarkm/*	$NetBSD: ibcs2_signal.h,v 1.7 1995/08/14 02:26:01 mycroft Exp $	*/
2233294Sstas
3233294Sstas/*
4233294Sstas * Copyright (c) 1994, 1995 Scott Bartram
555682Smarkm * All rights reserved.
6233294Sstas *
7233294Sstas * Redistribution and use in source and binary forms, with or without
8233294Sstas * modification, are permitted provided that the following conditions
955682Smarkm * are met:
10233294Sstas * 1. Redistributions of source code must retain the above copyright
11233294Sstas *    notice, this list of conditions and the following disclaimer.
1255682Smarkm * 2. Redistributions in binary form must reproduce the above copyright
13233294Sstas *    notice, this list of conditions and the following disclaimer in the
14233294Sstas *    documentation and/or other materials provided with the distribution.
15233294Sstas * 3. All advertising materials mentioning features or use of this software
1655682Smarkm *    must display the following acknowledgement:
17233294Sstas *      This product includes software developed by Scott Bartram.
18233294Sstas * 4. The name of the author may not be used to endorse or promote products
19233294Sstas *    derived from this software without specific prior written permission
2055682Smarkm *
21233294Sstas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22233294Sstas * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23233294Sstas * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24233294Sstas * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25233294Sstas * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26233294Sstas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27233294Sstas * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28233294Sstas * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29233294Sstas * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30233294Sstas * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31233294Sstas *
3255682Smarkm * $FreeBSD: head/sys/i386/ibcs2/ibcs2_signal.h 68520 2000-11-09 08:25:48Z marcel $
3355682Smarkm */
3455682Smarkm
3555682Smarkm#ifndef	_IBCS2_SIGNAL_H
36233294Sstas#define	_IBCS2_SIGNAL_H
3755682Smarkm
3855682Smarkm#define IBCS2_SIGHUP		1
3955682Smarkm#define IBCS2_SIGINT		2
4055682Smarkm#define IBCS2_SIGQUIT		3
4155682Smarkm#define IBCS2_SIGILL		4
4255682Smarkm#define IBCS2_SIGTRAP		5
43178825Sdfr#define IBCS2_SIGIOT		6
4455682Smarkm#define IBCS2_SIGABRT		6
4555682Smarkm#define IBCS2_SIGEMT		7
46233294Sstas#define IBCS2_SIGFPE		8
47178825Sdfr#define IBCS2_SIGKILL		9
48178825Sdfr#define IBCS2_SIGBUS		10
4955682Smarkm#define IBCS2_SIGSEGV		11
50178825Sdfr#define IBCS2_SIGSYS		12
51233294Sstas#define IBCS2_SIGPIPE		13
52178825Sdfr#define IBCS2_SIGALRM		14
53178825Sdfr#define IBCS2_SIGTERM		15
54178825Sdfr#define IBCS2_SIGUSR1		16
55178825Sdfr#define IBCS2_SIGUSR2		17
56178825Sdfr#define IBCS2_SIGCLD		18
57178825Sdfr#define IBCS2_SIGPWR		19
58178825Sdfr#define IBCS2_SIGWINCH		20
59178825Sdfr#define IBCS2_SIGPOLL		22
60178825Sdfr#define IBCS2_NSIG		32
61178825Sdfr#define IBCS2_SIGTBLSZ		32
62178825Sdfr
63233294Sstas/*
64178825Sdfr * SCO-specific
65178825Sdfr */
6672445Sassar#define IBCS2_SIGSTOP		23
6772445Sassar#define IBCS2_SIGTSTP		24
6855682Smarkm#define IBCS2_SIGCONT		25
6972445Sassar#define IBCS2_SIGTTIN		26
7055682Smarkm#define IBCS2_SIGTTOU		27
7172445Sassar#define IBCS2_SIGVTALRM		28
7272445Sassar#define IBCS2_SIGPROF		29
7372445Sassar
7472445Sassar#define IBCS2_SIGNO_MASK	0x00FF
75178825Sdfr#define IBCS2_SIGNAL_MASK	0x0000
76178825Sdfr#define IBCS2_SIGSET_MASK	0x0100
77178825Sdfr#define IBCS2_SIGHOLD_MASK	0x0200
78178825Sdfr#define IBCS2_SIGRELSE_MASK	0x0400
79178825Sdfr#define IBCS2_SIGIGNORE_MASK	0x0800
80178825Sdfr#define IBCS2_SIGPAUSE_MASK	0x1000
81178825Sdfr
82178825Sdfr#define IBCS2_SIGNO(x)		((x) & IBCS2_SIGNO_MASK)
83178825Sdfr#define IBCS2_SIGCALL(x)	((x) & ~IBCS2_SIGNO_MASK)
84178825Sdfr
85178825Sdfrtypedef long	ibcs2_sigset_t;
86178825Sdfrtypedef void	(*ibcs2_sig_t) __P((int));
87178825Sdfr
88178825Sdfrstruct ibcs2_sigaction {
89178825Sdfr	ibcs2_sig_t	isa_handler;
90233294Sstas	ibcs2_sigset_t	isa_mask;
91178825Sdfr	int		isa_flags;
92178825Sdfr};
9372445Sassar
94178825Sdfr#define IBCS2_SIG_DFL		((ibcs2_sig_t)0)
95178825Sdfr#define IBCS2_SIG_ERR		((ibcs2_sig_t)-1)
9672445Sassar#define IBCS2_SIG_IGN		((ibcs2_sig_t)1)
9790926Snectar#define IBCS2_SIG_HOLD		((ibcs2_sig_t)2)
9890926Snectar
9990926Snectar#define IBCS2_SIG_SETMASK	0
10072445Sassar#define IBCS2_SIG_BLOCK		1
10172445Sassar#define IBCS2_SIG_UNBLOCK	2
10272445Sassar
10372445Sassar/* sa_flags */
104178825Sdfr#define IBCS2_SA_NOCLDSTOP	1
105178825Sdfr
106178825Sdfr#define	IBCS2_MINSIGSTKSZ	8192
107178825Sdfr
108178825Sdfrextern int bsd_to_ibcs2_sig[];
109178825Sdfr
110178825Sdfr#endif /* _IBCS2_SIGNAL_H */
111178825Sdfr