xref: /csrg-svn/include/signal.h (revision 51390)
150750Sbostic /*-
250750Sbostic  * Copyright (c) 1991 The Regents of the University of California.
350750Sbostic  * All rights reserved.
450750Sbostic  *
550750Sbostic  * %sccs.include.redist.c%
650750Sbostic  *
7*51390Sbostic  *	@(#)signal.h	5.2 (Berkeley) 10/23/91
850750Sbostic  */
950750Sbostic 
10*51390Sbostic #ifndef _USER_SIGNAL_H
11*51390Sbostic #define _USER_SIGNAL_H
12*51390Sbostic 
13*51390Sbostic #include <sys/types.h>
14*51390Sbostic #include <sys/cdefs.h>
1550750Sbostic #include <sys/signal.h>
1650750Sbostic 
1750750Sbostic #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
1850750Sbostic extern char *sys_signame[NSIG];
1950750Sbostic extern char *sys_siglist[NSIG];
2050750Sbostic #endif
21*51390Sbostic 
22*51390Sbostic #define	sigaddset(set, signo)	(*(set) |= 1 << ((signo) - 1), 0)
23*51390Sbostic #define	sigdelset(set, signo)	(*(set) &= ~(1 << ((signo) - 1)), 0)
24*51390Sbostic #define	sigemptyset(set)	(*(set) = 0)
25*51390Sbostic #define	sigfillset(set)		(*(set) = ~(sigset_t)0, 0)
26*51390Sbostic #define	sigismember(set, signo)	((*(set) & (1 << ((signo) - 1))) != 0)
27*51390Sbostic 
28*51390Sbostic __BEGIN_DECLS
29*51390Sbostic int	raise __P((int));
30*51390Sbostic void	(*signal __P((int, void (*) __P((int))))) __P((int));
31*51390Sbostic #ifndef	_ANSI_SOURCE
32*51390Sbostic int	kill __P((pid_t, int));
33*51390Sbostic int	sigaction __P((int, const struct sigaction *, struct sigaction *));
34*51390Sbostic int	sigaddset __P((sigset_t *, int));
35*51390Sbostic int	sigdelset __P((sigset_t *, int));
36*51390Sbostic int	sigemptyset __P((sigset_t *));
37*51390Sbostic int	sigfillset __P((sigset_t *));
38*51390Sbostic int	sigismember __P((const sigset_t *, int));
39*51390Sbostic int	sigpending __P((sigset_t *));
40*51390Sbostic int	sigprocmask __P((int, const sigset_t *, sigset_t *));
41*51390Sbostic int	sigsuspend __P((const sigset_t *));
42*51390Sbostic #ifndef _POSIX_SOURCE
43*51390Sbostic int	killpg __P((pid_t, int));
44*51390Sbostic int	sigblock __P((int));
45*51390Sbostic int	siginterrupt __P((int, int));
46*51390Sbostic int	sigpause __P((int));
47*51390Sbostic int	sigreturn __P((struct sigcontext *));
48*51390Sbostic int	sigsetmask __P((int));
49*51390Sbostic int	sigstack __P((const struct sigstack *, struct sigstack *));
50*51390Sbostic int	sigvec __P((int, struct sigvec *, struct sigvec *));
51*51390Sbostic void	psignal __P((unsigned int, const char *));
52*51390Sbostic #endif	/* !_POSIX_SOURCE */
53*51390Sbostic #endif	/* !_ANSI_SOURCE */
54*51390Sbostic __END_DECLS
55*51390Sbostic 
56*51390Sbostic #endif	/* !_USER_SIGNAL_H */
57