ibcs2_signal.h revision 11397
1189251Ssam/*	$NetBSD: ibcs2_signal.h,v 1.7 1995/08/14 02:26:01 mycroft Exp $	*/
2189251Ssam
3189251Ssam/*
4189251Ssam * Copyright (c) 1994, 1995 Scott Bartram
5189251Ssam * All rights reserved.
6189251Ssam *
7189251Ssam * Redistribution and use in source and binary forms, with or without
8189251Ssam * modification, are permitted provided that the following conditions
9189251Ssam * are met:
10189251Ssam * 1. Redistributions of source code must retain the above copyright
11189251Ssam *    notice, this list of conditions and the following disclaimer.
12189251Ssam * 2. Redistributions in binary form must reproduce the above copyright
13189251Ssam *    notice, this list of conditions and the following disclaimer in the
14189251Ssam *    documentation and/or other materials provided with the distribution.
15189251Ssam * 3. All advertising materials mentioning features or use of this software
16189251Ssam *    must display the following acknowledgement:
17189251Ssam *      This product includes software developed by Scott Bartram.
18189251Ssam * 4. The name of the author may not be used to endorse or promote products
19189251Ssam *    derived from this software without specific prior written permission
20189251Ssam *
21189251Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22189251Ssam * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23189251Ssam * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24189251Ssam * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25189251Ssam * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26189251Ssam * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27189251Ssam * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28189251Ssam * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29189251Ssam * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30189251Ssam * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31189251Ssam */
32189251Ssam
33189251Ssam#ifndef	_IBCS2_SIGNAL_H
34189251Ssam#define	_IBCS2_SIGNAL_H
35189251Ssam
36189251Ssam#define IBCS2_SIGHUP		1
37189251Ssam#define IBCS2_SIGINT		2
38189251Ssam#define IBCS2_SIGQUIT		3
39189251Ssam#define IBCS2_SIGILL		4
40189251Ssam#define IBCS2_SIGTRAP		5
41189251Ssam#define IBCS2_SIGIOT		6
42189251Ssam#define IBCS2_SIGABRT		6
43189251Ssam#define IBCS2_SIGEMT		7
44189251Ssam#define IBCS2_SIGFPE		8
45189251Ssam#define IBCS2_SIGKILL		9
46189251Ssam#define IBCS2_SIGBUS		10
47189251Ssam#define IBCS2_SIGSEGV		11
48189251Ssam#define IBCS2_SIGSYS		12
49189251Ssam#define IBCS2_SIGPIPE		13
50189251Ssam#define IBCS2_SIGALRM		14
51189251Ssam#define IBCS2_SIGTERM		15
52189251Ssam#define IBCS2_SIGUSR1		16
53189251Ssam#define IBCS2_SIGUSR2		17
54189251Ssam#define IBCS2_SIGCLD		18
55189251Ssam#define IBCS2_SIGPWR		19
56189251Ssam#define IBCS2_SIGWINCH		20
57189251Ssam#define IBCS2_SIGPOLL		22
58189251Ssam#define IBCS2_NSIG		32
59189251Ssam
60189251Ssam/*
61189251Ssam * SCO-specific
62189251Ssam */
63189251Ssam#define IBCS2_SIGSTOP		23
64189251Ssam#define IBCS2_SIGTSTP		24
65189251Ssam#define IBCS2_SIGCONT		25
66189251Ssam#define IBCS2_SIGTTIN		26
67189251Ssam#define IBCS2_SIGTTOU		27
68189251Ssam#define IBCS2_SIGVTALRM		28
69189251Ssam#define IBCS2_SIGPROF		29
70189251Ssam
71189251Ssam#define IBCS2_SIGNO_MASK	0x00FF
72189251Ssam#define IBCS2_SIGNAL_MASK	0x0000
73189251Ssam#define IBCS2_SIGSET_MASK	0x0100
74189251Ssam#define IBCS2_SIGHOLD_MASK	0x0200
75189251Ssam#define IBCS2_SIGRELSE_MASK	0x0400
76189251Ssam#define IBCS2_SIGIGNORE_MASK	0x0800
77189251Ssam#define IBCS2_SIGPAUSE_MASK	0x1000
78189251Ssam
79189251Ssam#define IBCS2_SIGNO(x)		((x) & IBCS2_SIGNO_MASK)
80189251Ssam#define IBCS2_SIGCALL(x)	((x) & ~IBCS2_SIGNO_MASK)
81189251Ssam
82189251Ssamtypedef long	ibcs2_sigset_t;
83189251Ssamtypedef void	(*ibcs2_sig_t) __P((int));
84189251Ssam
85189251Ssamstruct ibcs2_sigaction {
86189251Ssam	ibcs2_sig_t	sa_handler;
87189251Ssam	ibcs2_sigset_t	sa_mask;
88189251Ssam	int		sa_flags;
89189251Ssam};
90189251Ssam
91189251Ssam#define IBCS2_SIG_DFL		(ibcs2_sig_t)(0)
92189251Ssam#define IBCS2_SIG_ERR		(ibcs2_sig_t)(-1)
93189251Ssam#define IBCS2_SIG_IGN		(ibcs2_sig_t)(1)
94189251Ssam#define IBCS2_SIG_HOLD		(ibcs2_sig_t)(2)
95189251Ssam
96189251Ssam#define IBCS2_SIG_SETMASK	0
97189251Ssam#define IBCS2_SIG_BLOCK		1
98189251Ssam#define IBCS2_SIG_UNBLOCK	2
99189251Ssam
100189251Ssam/* sa_flags */
101189251Ssam#define IBCS2_SA_NOCLDSTOP	1
102189251Ssam
103189251Ssamextern int bsd_to_ibcs2_sig[];
104189251Ssam
105189251Ssam#endif /* _IBCS2_SIGNAL_H */
106189251Ssam