signal.h revision 105208
1178173Simp/*- 2178173Simp * Copyright (c) 1991, 1993 3178173Simp * The Regents of the University of California. All rights reserved. 4178173Simp * 5178173Simp * Redistribution and use in source and binary forms, with or without 6178173Simp * modification, are permitted provided that the following conditions 7178173Simp * are met: 8178173Simp * 1. Redistributions of source code must retain the above copyright 9178173Simp * notice, this list of conditions and the following disclaimer. 10178173Simp * 2. Redistributions in binary form must reproduce the above copyright 11178173Simp * notice, this list of conditions and the following disclaimer in the 12178173Simp * documentation and/or other materials provided with the distribution. 13178173Simp * 3. All advertising materials mentioning features or use of this software 14178173Simp * must display the following acknowledgement: 15178173Simp * This product includes software developed by the University of 16178173Simp * California, Berkeley and its contributors. 17178173Simp * 4. Neither the name of the University nor the names of its contributors 18178173Simp * may be used to endorse or promote products derived from this software 19178173Simp * without specific prior written permission. 20178173Simp * 21178173Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22178173Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23178173Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24178173Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25178173Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26178173Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27178173Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28178173Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29178173Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30178173Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31178173Simp * SUCH DAMAGE. 32178173Simp * 33178173Simp * @(#)signal.h 8.3 (Berkeley) 3/30/94 34178173Simp * $FreeBSD: head/include/signal.h 105208 2002-10-16 07:01:10Z bde $ 35178173Simp */ 36178173Simp 37178173Simp#ifndef _SIGNAL_H_ 38178173Simp#define _SIGNAL_H_ 39178173Simp 40178173Simp#include <sys/cdefs.h> 41178173Simp#include <sys/_types.h> 42178173Simp#include <sys/signal.h> 43178173Simp 44178173Simp#if __BSD_VISIBLE 45178173Simp/* 46178173Simp * XXX should enlarge these, if only to give empty names instead of bounds 47178173Simp * errors for large signal numbers. 48178173Simp */ 49178173Simpextern __const char *__const sys_signame[NSIG]; 50178173Simpextern __const char *__const sys_siglist[NSIG]; 51178173Simpextern __const int sys_nsig; 52178173Simp#endif 53178173Simp 54178173Simp#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE 55178173Simp#ifndef _PID_T_DECLARED 56178173Simptypedef __pid_t pid_t; 57178173Simp#define _PID_T_DECLARED 58178173Simp#endif 59178173Simp#endif 60178173Simp 61178173Simp__BEGIN_DECLS 62178173Simpint raise(int); 63178173Simp 64178173Simp#if __POSIX_VISIBLE || __XSI_VISIBLE 65178173Simpint kill(__pid_t, int); 66178173Simpint sigaction(int, const struct sigaction * __restrict, 67178173Simp struct sigaction * __restrict); 68178173Simpint sigaddset(sigset_t *, int); 69178173Simpint sigdelset(sigset_t *, int); 70178173Simpint sigemptyset(sigset_t *); 71178173Simpint sigfillset(sigset_t *); 72178173Simpint sigismember(const sigset_t *, int); 73182901Sgonzoint sigpending(sigset_t *); 74182901Sgonzoint sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); 75178173Simpint sigsuspend(const sigset_t *); 76178173Simpint sigwait(const sigset_t * __restrict, int * __restrict); 77178173Simp#endif 78178173Simp 79178173Simp#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 80178173Simp#if 0 81178173Simp/* 82178173Simp * PR: 35924 83178173Simp * XXX we don't actually have these. We set _POSIX_REALTIME_SIGNALS to 84178173Simp * -1 to show that we don't have them, but this symbol is not necessarily 85178173Simp * in scope (in the current implementation), so we can't use it here. 86178173Simp */ 87178173Simpint sigqueue(__pid_t, int, const union sigval); 88178173Simpstruct timespec; 89178173Simpint sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict, 90178173Simp const struct timespec * __restrict); 91178173Simpint sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); 92178173Simp#endif 93178173Simp#endif 94178173Simp 95178173Simp#if __XSI_VISIBLE 96178173Simpint killpg(__pid_t, int); 97178173Simpint sigaltstack(const stack_t * __restrict, stack_t * __restrict); 98178173Simpint sigpause(int); 99178173Simp#endif 100178173Simp 101178173Simp#if __POSIX_VISIBLE >= 200112 102178173Simpint siginterrupt(int, int); 103178173Simp#endif 104178173Simp 105178173Simp#if __BSD_VISIBLE 106178173Simpint sigblock(int); 107178173Simpstruct __ucontext; /* XXX spec requires a complete declaration. */ 108178173Simpint sigreturn(const struct __ucontext *); 109178173Simpint sigsetmask(int); 110178173Simpint sigstack(const struct sigstack *, struct sigstack *); 111178173Simpint sigvec(int, struct sigvec *, struct sigvec *); 112178173Simpvoid psignal(unsigned int, const char *); 113178173Simp#endif 114178173Simp__END_DECLS 115178173Simp 116178173Simp#endif /* !_SIGNAL_H_ */ 117178173Simp