source: trunk/src/emx/include/signal.h@ 1574

Last change on this file since 1574 was 1574, checked in by bird, 21 years ago

Signal changes - enabled by NEW_SIGNALS.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 5.0 KB
Line 
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 */
56extern __const char *__const sys_signame[NSIG];
57extern __const char *__const sys_siglist[NSIG];
58extern __const int sys_nsig;
59#endif
60
61#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
62#ifndef _PID_T_DECLARED
63typedef __pid_t pid_t;
64#define _PID_T_DECLARED
65#endif
66#endif
67
68__BEGIN_DECLS
69int raise(int);
70
71#if __POSIX_VISIBLE || __XSI_VISIBLE
72int kill(__pid_t, int);
73int sigaction(int, const struct sigaction * __restrict,
74 struct sigaction * __restrict);
75int sigaddset(sigset_t *, int);
76int sigdelset(sigset_t *, int);
77int sigemptyset(sigset_t *);
78int sigfillset(sigset_t *);
79int sigismember(const sigset_t *, int);
80int sigpending(sigset_t *);
81int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
82int sigsuspend(const sigset_t *);
83int 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 */
94int sigqueue(__pid_t, int, const union sigval);
95#endif
96struct timespec;
97int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
98 const struct timespec * __restrict);
99int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
100#endif
101
102#if __XSI_VISIBLE
103int killpg(__pid_t, int);
104int sigaltstack(const stack_t * __restrict, stack_t * __restrict);
105int sigpause(int);
106#endif
107
108#if __POSIX_VISIBLE >= 200112
109int siginterrupt(int, int);
110#endif
111
112#if __BSD_VISIBLE
113int sigblock(int);
114struct __ucontext; /* XXX spec requires a complete declaration. */
115int sigreturn(const struct __ucontext *);
116int sigsetmask(int);
117int sigstack(const struct sigstack *, struct sigstack *);
118int sigvec(int, struct sigvec *, struct sigvec *);
119void psignal(unsigned int, const char *);
120#endif
121
122/* bird: standard call which BSD doesn't prototype. */
123#if __XSI_VISIBLE
124int sighold(int);
125int sigignore(int);
126int sigrelse(int);
127#endif
128#if __BSD_VISIBLE && !defined(_XOPEN_SOURCE) && !defined(sigpause)
129int __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 */
152extern __const char *__const sys_signame[NSIG];
153extern __const char *__const sys_siglist[NSIG];
154extern __const int sys_nsig;
155#endif
156
157
158#endif /* not _SIGNAL_H */
159
160#endif /* !__NEW_SIGNALS__ */
Note: See TracBrowser for help on using the repository browser.