| 1 | #ifdef __NEW_SIGNALS__
|
|---|
| 2 | /** @file
|
|---|
| 3 | * FreeBSD 5.1
|
|---|
| 4 | * @changed bird: Added sighold(), sigignore(), sigrelse(). Added wrapper
|
|---|
| 5 | * between the two sigpause() APIs.
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /*-
|
|---|
| 9 | * Copyright (c) 1991, 1993
|
|---|
| 10 | * The Regents of the University of California. All rights reserved.
|
|---|
| 11 | *
|
|---|
| 12 | * Redistribution and use in source and binary forms, with or without
|
|---|
| 13 | * modification, are permitted provided that the following conditions
|
|---|
| 14 | * are met:
|
|---|
| 15 | * 1. Redistributions of source code must retain the above copyright
|
|---|
| 16 | * notice, this list of conditions and the following disclaimer.
|
|---|
| 17 | * 2. Redistributions in binary form must reproduce the above copyright
|
|---|
| 18 | * notice, this list of conditions and the following disclaimer in the
|
|---|
| 19 | * documentation and/or other materials provided with the distribution.
|
|---|
| 20 | * 3. All advertising materials mentioning features or use of this software
|
|---|
| 21 | * must display the following acknowledgement:
|
|---|
| 22 | * This product includes software developed by the University of
|
|---|
| 23 | * California, Berkeley and its contributors.
|
|---|
| 24 | * 4. Neither the name of the University nor the names of its contributors
|
|---|
| 25 | * may be used to endorse or promote products derived from this software
|
|---|
| 26 | * without specific prior written permission.
|
|---|
| 27 | *
|
|---|
| 28 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|---|
| 29 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|---|
| 30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|---|
| 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|---|
| 32 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|---|
| 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|---|
| 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|---|
| 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|---|
| 36 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|---|
| 37 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|---|
| 38 | * SUCH DAMAGE.
|
|---|
| 39 | *
|
|---|
| 40 | * @(#)signal.h 8.3 (Berkeley) 3/30/94
|
|---|
| 41 | * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $
|
|---|
| 42 | */
|
|---|
| 43 |
|
|---|
| 44 | #ifndef _SIGNAL_H_
|
|---|
| 45 | #define _SIGNAL_H_
|
|---|
| 46 |
|
|---|
| 47 | #include <sys/cdefs.h>
|
|---|
| 48 | #include <sys/_types.h>
|
|---|
| 49 | #include <sys/signal.h>
|
|---|
| 50 |
|
|---|
| 51 | #if __BSD_VISIBLE
|
|---|
| 52 | /*
|
|---|
| 53 | * XXX should enlarge these, if only to give empty names instead of bounds
|
|---|
| 54 | * errors for large signal numbers.
|
|---|
| 55 | */
|
|---|
| 56 | extern __const char *__const sys_signame[NSIG];
|
|---|
| 57 | extern __const char *__const sys_siglist[NSIG];
|
|---|
| 58 | extern __const int sys_nsig;
|
|---|
| 59 | #endif
|
|---|
| 60 |
|
|---|
| 61 | #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
|
|---|
| 62 | #ifndef _PID_T_DECLARED
|
|---|
| 63 | typedef __pid_t pid_t;
|
|---|
| 64 | #define _PID_T_DECLARED
|
|---|
| 65 | #endif
|
|---|
| 66 | #endif
|
|---|
| 67 |
|
|---|
| 68 | __BEGIN_DECLS
|
|---|
| 69 | int raise(int);
|
|---|
| 70 |
|
|---|
| 71 | #if __POSIX_VISIBLE || __XSI_VISIBLE
|
|---|
| 72 | int kill(__pid_t, int);
|
|---|
| 73 | int sigaction(int, const struct sigaction * __restrict,
|
|---|
| 74 | struct sigaction * __restrict);
|
|---|
| 75 | int sigaddset(sigset_t *, int);
|
|---|
| 76 | int sigdelset(sigset_t *, int);
|
|---|
| 77 | int sigemptyset(sigset_t *);
|
|---|
| 78 | int sigfillset(sigset_t *);
|
|---|
| 79 | int sigismember(const sigset_t *, int);
|
|---|
| 80 | int sigpending(sigset_t *);
|
|---|
| 81 | int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
|
|---|
| 82 | int sigsuspend(const sigset_t *);
|
|---|
| 83 | int sigwait(const sigset_t * __restrict, int * __restrict);
|
|---|
| 84 | #endif
|
|---|
| 85 |
|
|---|
| 86 | #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
|
|---|
| 87 | #if 0
|
|---|
| 88 | /*
|
|---|
| 89 | * PR: 35924
|
|---|
| 90 | * XXX we don't actually have these. We set _POSIX_REALTIME_SIGNALS to
|
|---|
| 91 | * -1 to show that we don't have them, but this symbol is not necessarily
|
|---|
| 92 | * in scope (in the current implementation), so we can't use it here.
|
|---|
| 93 | */
|
|---|
| 94 | int sigqueue(__pid_t, int, const union sigval);
|
|---|
| 95 | #endif
|
|---|
| 96 | struct timespec;
|
|---|
| 97 | int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
|
|---|
| 98 | const struct timespec * __restrict);
|
|---|
| 99 | int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
|
|---|
| 100 | #endif
|
|---|
| 101 |
|
|---|
| 102 | #if __XSI_VISIBLE
|
|---|
| 103 | int killpg(__pid_t, int);
|
|---|
| 104 | int sigaltstack(const stack_t * __restrict, stack_t * __restrict);
|
|---|
| 105 | int sigpause(int);
|
|---|
| 106 | #endif
|
|---|
| 107 |
|
|---|
| 108 | #if __POSIX_VISIBLE >= 200112
|
|---|
| 109 | int siginterrupt(int, int);
|
|---|
| 110 | #endif
|
|---|
| 111 |
|
|---|
| 112 | #if __BSD_VISIBLE
|
|---|
| 113 | int sigblock(int);
|
|---|
| 114 | struct __ucontext; /* XXX spec requires a complete declaration. */
|
|---|
| 115 | int sigreturn(const struct __ucontext *);
|
|---|
| 116 | int sigsetmask(int);
|
|---|
| 117 | int sigstack(const struct sigstack *, struct sigstack *);
|
|---|
| 118 | int sigvec(int, struct sigvec *, struct sigvec *);
|
|---|
| 119 | void psignal(unsigned int, const char *);
|
|---|
| 120 | #endif
|
|---|
| 121 |
|
|---|
| 122 | /* bird: standard call which BSD doesn't prototype. */
|
|---|
| 123 | #if __XSI_VISIBLE
|
|---|
| 124 | int sighold(int);
|
|---|
| 125 | int sigignore(int);
|
|---|
| 126 | int sigrelse(int);
|
|---|
| 127 | #endif
|
|---|
| 128 | #if __BSD_VISIBLE && !defined(_XOPEN_SOURCE) && !defined(sigpause)
|
|---|
| 129 | int __sigpause_bsd(int);
|
|---|
| 130 | #define sigpause(mask) __sigpause_bsd(mask)
|
|---|
| 131 | #endif
|
|---|
| 132 | /* bird: end */
|
|---|
| 133 |
|
|---|
| 134 | __END_DECLS
|
|---|
| 135 |
|
|---|
| 136 | #endif /* !_SIGNAL_H_ */
|
|---|
| 137 |
|
|---|
| 138 | #else /* !__NEW_SIGNALS__ */
|
|---|
| 139 |
|
|---|
| 140 | /* signal.h (emx+gcc) */
|
|---|
| 141 |
|
|---|
| 142 | #ifndef _SIGNAL_H
|
|---|
| 143 | #define _SIGNAL_H
|
|---|
| 144 | #include <sys/cdefs.h>
|
|---|
| 145 | #include <sys/signal.h>
|
|---|
| 146 |
|
|---|
| 147 | #if __BSD_VISIBLE
|
|---|
| 148 | /*
|
|---|
| 149 | * XXX should enlarge these, if only to give empty names instead of bounds
|
|---|
| 150 | * errors for large signal numbers.
|
|---|
| 151 | */
|
|---|
| 152 | extern __const char *__const sys_signame[NSIG];
|
|---|
| 153 | extern __const char *__const sys_siglist[NSIG];
|
|---|
| 154 | extern __const int sys_nsig;
|
|---|
| 155 | #endif
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 | #endif /* not _SIGNAL_H */
|
|---|
| 159 |
|
|---|
| 160 | #endif /* !__NEW_SIGNALS__ */
|
|---|