xref: /original-bsd/include/signal.h (revision 3413c235)
1 /*-
2  * Copyright (c) 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)signal.h	8.3 (Berkeley) 03/30/94
8  */
9 
10 #ifndef _USER_SIGNAL_H
11 #define _USER_SIGNAL_H
12 
13 #include <sys/types.h>
14 #include <sys/cdefs.h>
15 #include <sys/signal.h>
16 
17 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
18 extern __const char *__const sys_signame[NSIG];
19 extern __const char *__const sys_siglist[NSIG];
20 #endif
21 
22 __BEGIN_DECLS
23 int	raise __P((int));
24 #ifndef	_ANSI_SOURCE
25 int	kill __P((pid_t, int));
26 int	sigaction __P((int, const struct sigaction *, struct sigaction *));
27 int	sigaddset __P((sigset_t *, int));
28 int	sigdelset __P((sigset_t *, int));
29 int	sigemptyset __P((sigset_t *));
30 int	sigfillset __P((sigset_t *));
31 int	sigismember __P((const sigset_t *, int));
32 int	sigpending __P((sigset_t *));
33 int	sigprocmask __P((int, const sigset_t *, sigset_t *));
34 int	sigsuspend __P((const sigset_t *));
35 #ifndef _POSIX_SOURCE
36 int	killpg __P((pid_t, int));
37 int	sigblock __P((int));
38 int	siginterrupt __P((int, int));
39 int	sigpause __P((int));
40 int	sigreturn __P((struct sigcontext *));
41 int	sigsetmask __P((int));
42 int	sigstack __P((const struct sigstack *, struct sigstack *));
43 int	sigvec __P((int, struct sigvec *, struct sigvec *));
44 void	psignal __P((unsigned int, const char *));
45 #endif	/* !_POSIX_SOURCE */
46 #endif	/* !_ANSI_SOURCE */
47 __END_DECLS
48 
49 /* List definitions after function declarations, or Reiser cpp gets upset. */
50 #define	sigaddset(set, signo)	(*(set) |= 1 << ((signo) - 1), 0)
51 #define	sigdelset(set, signo)	(*(set) &= ~(1 << ((signo) - 1)), 0)
52 #define	sigemptyset(set)	(*(set) = 0, 0)
53 #define	sigfillset(set)		(*(set) = ~(sigset_t)0, 0)
54 #define	sigismember(set, signo)	((*(set) & (1 << ((signo) - 1))) != 0)
55 
56 #endif	/* !_USER_SIGNAL_H */
57